For styling purposes, I use an IF statement in assigning a particular class to certain divs based on either pageid, category, etc.
I need a way to reference the calendar page. I created a custom page template (calendar.php) and I use it to show the calendar on.
If I run this code:
global $template; print_r($template);
It shows that that is the template being used, but if I add to my styling function the condition
it returns “false”.
Is there an easier way to reference the page being used?
- The topic ‘Reference Calendar Page in Function’ is closed to new replies.