Forums

is_page() doesn't work for one specific page (2 posts)

  1. Llasse
    Member
    Posted 3 years ago #

    Hi there,
    for my sidebar I am checking via is_page() wich page is displayed, so that I can then load a page-specific aside.
    It works fine, except for one page with the ID 34 - and I don't get why this is so. I have already edited the page and saved it again, but it still won't recognize it via is_page(34) - do you have any idea what might be the problem?

    Thanks in advance!

  2. MichaelH
    Member
    Posted 3 years ago #

    Might need to add a reset to your page template after where you disturb the normal query

    <?php
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags