I have a wordpress site and some custom code that I only what to run if the post is part of a Series.
So my address http://www.MYSITE.com/series/interesting-facts
I want the custom code to run when I am in "Series". How do I do that?
No - the is_page only works on the name of the page - series would be common to all pages.
How have you implemented your pages in your series?
Kimputer
Use $_SERVER['REQUEST_URI'], check that the first part is '/series'
Just make sure those pages are based on a template (and have the template contain the PHP code).
Robert Granlund
ASKER
@Julian:
The template is taxonomy-series.php per the wordpress instructions. For somereason I can't get it to work by the template name.
@Kimputer:
Use $_SERVER['REQUEST_URI'], check that the first part is '/series' -- How do I write that?
You probably looking for the is_page() function
Open in new window