Adding php code for current year to footer

Discussion in 'Harrington- A WordPress Business Theme.' started by sotb0rlando, Feb 21, 2014.

  1. sotb0rlando

    sotb0rlando Member

    Joined:
    Dec 9, 2012
    Messages:
    76
    Likes Received:
    1
    Location:
    Orlando
    Hello,

    I am trying to add this code (Copyright 2011 - <?php print date('Y'); ?>) to my sites "Footer Text" section under Footer Settings. However the php code is not pulling the current year. How can I get the current year in this footer without hardcoding it?
     
  2. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
  3. sotb0rlando

    sotb0rlando Member

    Joined:
    Dec 9, 2012
    Messages:
    76
    Likes Received:
    1
    Location:
    Orlando
  4. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
    Hello,

    It is not possible to run php code in the "Footer Text" section of your dashboard.
    You have to do hard code in the footer.php file for this.
    Go to the footer.php file present in your theme directory and paste your text with php code for footer text area in this file
    as instructed in the image given below.

    [​IMG]

    Now, go to the Appearance > Theme Options > Footer Settings panel in your dashboard
    and clear all the content from the footer text section.

    This will solve your issue.
     

Share This Page