wordpress year call

Discussion in 'PHP' started by nighteagle, Jan 17, 2010.

  1. #1
    in my theme i put this code
    &copy; <?php the_time('Y') ?> 
    Code (markup):
    but it still showing (c) 2009 ?
    what happens?
     
    nighteagle, Jan 17, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Theirs probably something wrong with the function - the_time.

    Besides, you don't need a user defined function for that, simple add:

    put:

    &copy; <?php echo date("Y"); ?>
    PHP:
     
    danx10, Jan 17, 2010 IP
  3. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My guess is you're editing the wrong file, not saved it or the theme doesn't take the year from this point in the code. That code is absolutely fine
     
    JAY6390, Jan 17, 2010 IP
  4. nighteagle

    nighteagle Peon

    Messages:
    328
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey it works.. :p thanks.. :) :)

     
    nighteagle, Jan 21, 2010 IP
  5. nitrox

    nitrox Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Check your server or Wordpress settings.... make sure you get the right year/timezone
     
    nitrox, Jan 22, 2010 IP