Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6720411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:12:33+00:00 2026-05-26T09:12:33+00:00

In wordpress I know it’s possible to output a nested navigation by indenting pages

  • 0

In wordpress I know it’s possible to output a nested navigation by indenting pages in appearance->menus and adding some code to the functions.php file. But I want to automate this.

In my site a top level nav shows all the top level pages. I’ve created a left menu that shows secondary level items for that section and then tertiary level items when a user clicks on a second level item. I’ve created this by adding the menu in appearance->menus and manually indenting pages.

I want the left nav to show automatically. So no need for creating the nan in appearance->menus and I want users to be able to add new second level items and third level items and the nav gets updated automatically – without the need for the user to go in to menus and add the item. So when a user clicks upon my products section in the top nav they get all the nested pages under that section in the left menu

Is this possible?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:12:33+00:00Added an answer on May 26, 2026 at 9:12 am

    It seems there is a definitive answer to this question so I’m posting here for anyone else with a similar problem.

    Use wordpress wp_list_pages to list child pages:

    http://codex.wordpress.org/Template_Tags/wp_list_pages. You can set the depth to show as many levels as you need.

    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0&depth=0');
    if ($children) { ?>
      <ul>
        <?php echo $children; ?>
      </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wanting to insert some code after each post in WordPress... I know
in wordpress, how do I know what page is current? I have 5 pages
hi i know there are many nice functions in wordpress like is_page() , is_single()
we would like to know, How to create Vertical Navigation Menu in Wordpress. I
We all know that wordpress have simple .htaccess code like below RewriteEngine on RewriteBase
Does anyone know of an existing Related Pages plugin for Wordpress, specifically where you
I only know Wordpress and have started to seek another alternative framework, Zend. I
i want to know what wordpress build-in function you will use when sanitizing specific
Does anyone know how secure Wordpress is? I have no clue how to define
Does anyone know how to modify the Wordpress canonical links to add a custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.