• I’m having an odd problem with conditional tags at the moment.

    If i use if ( !is_front_page() ) { ... everything is fine, and if I use
    if ( !is_page_template('page-store.php') ) { ... again it’s all good.

    BUT… if ( !is_front_page() || !is_page_template('page-store.php') ) { ... will not work and I don’t know why.

    Is this a WordPress 3.0 bug?….or am i doing something wrong?

    thanks.

Viewing 1 replies (of 1 total)
  • no bug – it is boolean algebra:
    if ( !is_front_page() || !is_page_template('page-store.php') )

    is almost always TRUE, as most pages are either not front page or not page-store (unless the page-store template is used for the front page)

    did you mean:
    if ( !( is_front_page() || is_page_template('page-store.php') ) )

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional ‘or’ ( || ) not working in sidebar’ is closed to new replies.