Support » Themes and Templates » is_page() in the footer not working?

  • This bit does work in the header but not in the footer, where it returns both not being main-page or 52, ie: in the header i have the correct linked/notlinked text appearing, in the footer, both are linked…

    <?php if (!is_page('main-page')) { ?>
    <a href="<?php echo bloginfo('wpurl'); ?>">see selected projects</a>
    <?php } else { ?>
    see selected projects
    <?php } ?>
    <?php if (!is_page('52')) { ?>
     / <a href="<?php echo bloginfo('wpurl'); ?>/view-all-projects">see all projects</a>
    <?php } else { ?>
    / see all projects
    <?php } ?>

    I am having the (somehow) same issue as here:
    with the footer and is_page combination on 2.3.1
    I also had an (unfortunate) look here:
    Is there really no chance to get this working on 2.3.1?
    Thanks in advance for any view or help on this!

  • The topic ‘is_page() in the footer not working?’ is closed to new replies.