Forums

Printing navigation hierachy on a separate WP-page (6 posts)

  1. ludwigt
    Member
    Posted 6 months ago #

    Hello

    I am fairly new to WordPress and I feel I have done an OK job trying to check this up before posting.

    I have a category called Articles and several children which obviously are the articles in question.
    The drop-down menu choice Articles thus generates in a very long and non-user-friendly menu.

    What I want to do is to only have a non-dropping down menu choice Articles. When it is clicked it takes the user to a page where all children of Articles are listed automatically:

    Articles

    My idea is to have this list updated automatically so that I don't have to manually enter each new article that is added as a child to Articles.

    I did find some PHP code (get_post_ancestors()) but from what I figured it can not be used on the pages that you create through the WordPress editor.

    My apologies if this question comes across as ignorant due to some blatantly obvious answer, but I hope some generous soul might shed some light on my issue.

    best regards
    -L.T.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

  3. ludwigt
    Member
    Posted 6 months ago #

    There is no such functionality already present in WordPress, then?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 6 months ago #

  5. ludwigt
    Member
    Posted 5 months ago #

    I have successfully created a template that does what I want by utilizing wp_list_pages().

    However, I would want this the generated list to be present inside the text of the page though and I am still not sure how I can fuse that one with the page's contents.

    I suppose that, too, is a newbie question but I would be very grateful if someone could again point me in the right direction.

    Thank-yous in advance
    ~L

  6. esmi
    Theme Diva & Forum Moderator
    Posted 5 months ago #

    You would need to edit the code to the page's template file - page.php for the default page template.

Reply

You must log in to post.

About this Topic