I’m having a problem using the following code in my sidebar [in php tags]
if ( is_single(“poker”))
echo (“POKER”);
[/CODE]
The “poker” page uses a custom template which includes the sidebar – yet nothing is printed.. the same code works fine on other non-custom-templated pages ….
anyone got any ideas? google yields nowt.
cheers[CODE]
if ( is_single(“poker”))
echo (“POKER”);
[/CODE]
The “poker” page uses a custom template which includes the sidebar – yet nothing is printed.. the same code works fine on other non-custom-templated pages ….
anyone got any ideas? google yields nowt. ” title=”” class=”bbcode_smiley” />
cheers
And can’t you use the “is_page_template” instead?
Or maybe is_page(‘Poker’) instead of is_single if it's a Page not a Post named Poker " title="" class="bbcode_smiley" />
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:re”>is_page_template(‘poker.php’)Or maybe is_page(‘Poker’) instead of is_single if it's a Page not a Post named Poker " title="" class="bbcode_smiley" />
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 ” title=”” class=”bbcode_smiley” />
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.
Please login or Register to submit your answer