WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Header.php different for home and single? (5 posts)

  1. venkmanuk
    Member
    Posted 1 year ago #

    Hi there,

    This is a bit weird. The header.php file in my site's homepage is showing the right code, but on other pages ( I'm only using single.php ) it shows an old version where the code has a note for me in the place where I needed to remember to add meta info.

    take a look at the source of colinelliot.com and then click to view a page and check the source. am i going mad ? the single posts are using an old version of the header with <!-- ** ADD META INFORMATION ** -->

    there are no other themes installed and no instances of the above ADD META comment in the theme when i search for them. I've cleared my browser cache but still no joy.

    say it ain't so! ?

  2. W.P. Ginfo
    Member
    Posted 1 year ago #

    Assuming you have only one header.php, and the othet php-files you mention were NOT edited... it's unusual... Probably human error ;)

    Don't worry about 'how', move foreward.

    ALWAYS Make a backup of your site, before making any changes!!
    Make changes in a childtheme!

    Delete the 'note to self' througout the various php-files and check if the site works.

    Check if replacing the php-files with freshly downloaded versions from your theme will restore the situation.

  3. venkmanuk
    Member
    Posted 1 year ago #

    Thanks alll good advice, stuff I always do... Hopefully it's just some kind of cache issue. The code is straight. Will post again if it's an actual issue.

  4. venkmanuk
    Member
    Posted 1 year ago #

    It was reading the header from the old location. Migration issue. classic!

  5. W.P. Ginfo
    Member
    Posted 1 year ago #

    Great job. We live and learn.

Topic Closed

This topic has been closed to new replies.

About this Topic