Get exclusive CAP network offers from top brands

View CAP Offers

Reply To: wpress problem: is_single(x) not working in templated pages.

[bsa_pro_ad_space id=2]
#799714
neophyte
Member

@TonyP 203794 wrote:

Not an expert at all at php/wp but should it not be single quotes like in the code below?
And can’t you use the “is_page_template” instead?

Code:
is_page_template(‘poker.php’)

Or maybe is_page(‘Poker’) instead of is_single if it's a Page not a Post named Poker :)

nah the wpress syntax for the function has dbl quotes. you use either the page ID, the stub or the page name..

edit: it works ok when I set it to use the default template, so it’s definitely a template issue :(

the possible solution you gave above won’t work for me as I have a bunch of pages using the poker_tempate template, but only want to echo the text on the sidebar of the “poker” page, which uses this template.