I'm trying to display a menu specific to a collection of pages and categories as if to make a section in the blog.
That URL displays a menu top left that only appears when visiting "parents". I use slug to check this. If I click on the "Parent Talk Page" link, this url...
The menu will no longer show, I tried "parent-talk-page" and "parents/parent-talk-page" in my If statement but the slug does not seem to match these.
It is because of this...
$post_obj = $wp_query->get_queried_object();
$slug = $post_obj->post_name;
if($slug == "parents" || $slug == "students")
$_SESSION['page-requested'] = $slug;
$_SESSION['page-requested'] = " ";
It would be a very long task to extend the initial if statement to include all slugs so is there a better way of doing this?