• Resolved aldereteka

    (@aldereteka)


    Can anyone tell me what I’m doing wrong? Everything works with the Home and Teacher page, but not for the search results. In the widget logic, I’ve got:

    is_page( array( ‘english-teachers’, ‘Home’ ) ) OR is_search( ‘member/?s=English+Teacher’ )

    I’ve also tried:

    is_page( array( ‘english-teachers’, ‘Home’ ) ) OR is_search( ‘English+Teacher’ )

    I’ve tried a dozen combinations as well as substituting OR for ||. Nothing.

    I’m using Buddypress default theme and I’m about to throw my computer out the window.

    Thanks.

    http://wordpress.org/extend/plugins/widget-logic/

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

    (@alanft)

    http://codex.wordpress.org/Function_Reference/is_search

    is_search doesn’t take parameters I’m afraid. if plain is_search() doesn’t make a widget appear on a search results page, there is something else going on.

    if you want a widget to appear when certain search terms are checked for, that’s going to be some sort of combo of is_search() and $_GET[‘q’]==”English Teacher” but that’s going to need some extra cleverness to not be case sensitive or word order specific and so on.

    Thread Starter aldereteka

    (@aldereteka)

    Thanks for the info. I’ll play around with it and see what cleverness I can muster. Great plugin, btw.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Combining Conditional Tags’ is closed to new replies.