• Hello again.

    Recap: I’m using the Blix theme.

    In the sidebar.php file, I’d like to have some stuff showup if one of my user-defined pages is active (such as Title=Contact). However, I don’t seem to be able to get it to work. I’ve tried:

    is_page(‘Contact’)
    is_page(“Contact”)
    is_page(‘contact’)
    is_page(“contact”)

    I would guess that I’m just approaching the situation incorrectly. Is there another way of deducing whether or not a user-def’d page is active?

    Thanks,
    Mike

    p.s. Where can I find the code for is_page()?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Blix is a strange animal with its own proprietary code – don’t expect an enthusiastic support for it…
    Documentation for is_page: http://codex.wordpress.org/Conditional_Tags

    Thread Starter redcrocodile

    (@redcrocodile)

    Ah, I see.

    Well, it turns out that I was doing it correctly (with is_page(‘Contact’). However, the code in sidebar.php isn’t executed when a user-defined page is being visisted 🙁

    I ensured this is correct by putting an if (true) block in sidebar.php. It’s executed on main page(s) but not user-defined ones 🙁

    This appears to be because of the method get_sidebar(). I am trying to find the actual PHP code for that right now (but not doing so well?!)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘is_page() — for user defined pages’ is closed to new replies.