Support » Fixing WordPress » Can you set the parent of a post as a Page?

  • I have a site build of Pages. Using the Fold Page List plugin, I can automatically set the styles of my menu items to show that they are currently selected, and to display the sub nav items required. My post entries sit in the News section of my site (split into Archive and Latest). When I click on a single post to view it, my navigation reverts to everything unslected. I’m guessing this is because the Post is not a Page and therefore the Fold Page List can’t get a parent.

    Can I set the single.php to automatically open the correct level of my navigation?

Viewing 1 replies (of 1 total)
  • A little late on the reply, but I think it’ll help if anyone is looking for a solution to a similar issue.

    I’m assuming by “open” you mean to have the navigation element highlighted for your post.

    You will have to add some conditional arguments with your wswwpx_fold_page_list function.

    My php knowledge is horrible, but if you’re smart then It may look something like this:

    if have_posts() that are posts and not pages then
    <li class="current_list_item"><a href="">news</a></li>
    <li><a href="">news</a></li>
    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>

    Good Luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Can you set the parent of a post as a Page?’ is closed to new replies.