I am setting my navigation elements to change it’s class to class=”selected” when you are on a specific page in the site. I have it working, except for the blog (home.php) page. I have set the “posts page” to “blog” in the Reading Settings, and here is the code that tells each page (or child of a page) which navigational section to change the class for
//* WORK *//
$work_selected = '';
if (is_page('work') || $post->post_parent == '39') {
$work_selected = 'selected';
} else {
$work_selected = '';
}
//* BLOG *//
$blog_selected = '';
if (is_page('blog') || $post->post_parent == '64') {
$blog_selected = 'selected';
} else {
$blog_selected = '';
Again, the WORK version does indeed work, as does the other pages on the site. For some reason, the BLOG page does not work. Any help?