current_page_item Set with if-statement
-
Hey,
So I was wondering if it’s possible to set the current_page_item with an if statement or some other kind of php when you are viewing a post? I have a feeling it’s possible but when I tried
<?php $page_id=36; ?><?php if(get_page($page_id)) echo ' class="current_page_item"'; ?>
but it doesn’t do anything. Help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘current_page_item Set with if-statement’ is closed to new replies.