WP Pages and section sub-navs?
-
Hi all, I’m stuck on a template problem involving listing pages, and I wonder if someone here can help:
Our organization, Free the Slaves, has a site organized like
1. About
1a. Our mission
1b. Highlights
1c. Partners
1c1. Sankalp
1c2. APPLE
1d. Internships
2. Resources
…I am in the process of converting the site to a WP-powered blog and CMS, and I’m stuck on how to dynamically create the sub-navigation from each section (such as “About” and “Resources”, above).
Ideally, I could modify the get_links_list() function in the template to show the full hierarchy of links for a given section, depending on where the user is in the site. For example, if the user was in any page within the “About” section, the subnav would look like this:
1. About
1a. Our mission
1b. Highlights
1c. Partners
1c1. Sankalp
1c2. APPLE
1d. InternshipsI’ve looked at other support pages like this one, but I can’t quite figure out how to pull off what I’m looking for. My hunch is that the crucial step is to find the section parent for a given page (that is, the topmost parent of a page without a parent, itself) and then build the hierarchy from there, but I can’t figure that step out.
Could anyone please help me with this problem?
Best,
Jacob Patton
Free the Slaves
- The topic ‘WP Pages and section sub-navs?’ is closed to new replies.