Menus Parent pages (5 posts)

  1. Cregy
    Posted 10 years ago #

    Hi All

    I have searched the archives and read the codex but still don't understand how to do this problem! I think it might have something to do with being 4.45pm here and my brain has died!

    I have a site: http://www.lostwithiel.org.uk/ which has a large number of pages and these will be growing. What I want to do is to display only the parent page title. Then when I visit that page all links included within that parent page become available.

    Having read through it seems the easiest way to do this, (for me anyway), is to have a template for each category. Then to exclude all pages in the main index.php except for parent ones, then when the user clicks on the right page, this displays all the child pages.

    If I am correct in this, then is there a piece of code please that says, "Display all children" and "only display all parents", otherwise everytime I or other folks create a new page, I will have to edit the template.

    Or is there a better way to do this?

    Thanks for your help.


  2. moshu
    Posted 10 years ago #

  3. Beel
    Posted 10 years ago #

    Yeah, its in the forum several times (I know as I have posted it a couple of times)...

    <?php if($wp_query->is_page) {

    $lp_param = "";
    $lp_param = "title_li=<h2>" . __('Contents') . "</h2>&depth=1&sort_column=menu_order&child_of=" .
    } ?>

  4. Cregy
    Posted 10 years ago #

    Hi Guys

    Thanks so much for the help. I did try the method suggested by Beel but it didn't work so after using the search suggested by Moshu I ended up using a plugin:
    It worked really well. I am using beta 2 by the way.


  5. roblgs
    Posted 10 years ago #

    Hi Rich,

    Happy that it works for you...

    Just to clarify though, by beta 2 you mean current version of the plugin (v1.0.1) with WP2beta2 I think.

    The companion plugin for categories (fold_category_list) is also working under the WP2beta2... at least as far as preliminary testing reveals.

    Best regards


Topic Closed

This topic has been closed to new replies.

About this Topic