This function displays a list of WordPress Pages as links. It is often used to customize the Sidebar or Header, but may be used in other Templates as well.

learn more… | top users | synonyms

0
votes
1answer
723 views

List child pages by slug not ID?

I am looking to use the wp_list_pages function to show children pages of a specific page ID. I was able to do this easily, but now I found an issue with it. I am running a Wordpress network of sites ...
0
votes
0answers
15 views

Get Next/Previous (Sibling) Top Level Parent Page Id - Wordpress

Question: Is there any possibility to get next/previous page id in wp_nav_menu in wordpress. Example: I have navigation menu like this Menu_Item_1 (ID = 5) >SubMenu_Item_1-1 ...
0
votes
2answers
313 views

Handling complex multi-level architecture / menu for large site

I am trying to get feedback and ideas for solving an information architecture / content management problem using wordpress. I have a large site ( 1,000+ pages, hundreds of posts ) made up of ...
0
votes
1answer
10 views

Post Fetching Ignoring Sort_Column?

I am using the code below subpages for my portfolio. For some reason, it seems to be ignoring the ordering I have set on my pages. Any help? <?php $args = array( 'post_type' => ...
4
votes
2answers
352 views

Highlighting current item of custom post types' sub pages, listed by wp_list_pages

The below code is for listing the custom post types itself and its children in the sidebar. The code works great but does not highlight the sub pages. In functions.php: ...
0
votes
1answer
266 views

Displaying different page links on different pages

I have a wordpress site with 100+ pages. Now suppose 5 pages are related to page 1, and I want to show them in side bar as similar pages/related pages and other group of pages in other menu in ...
1
vote
3answers
63 views

How to echo excerpts with wp_list_pages?

I've tried to echo excerpts in wp_list_pages with the code below. It works, but only for one of the child pages. How would I echo the excerpt and title for each child page? <?php $children = ...
0
votes
2answers
22 views

Do Not Display Parent Page if No Subpages

This is the code from the codex most commonly used for sidebar menus. It displays the child pages of the top level ancestor and the ancestor itself. There is one thing about this code I would like to ...
0
votes
1answer
509 views

Need some help with “the_widget()” function

I am trying to create code to display certain default WordPress widgets on my e-commerce site. I have 6 content boxes which display WordPress widgets: • Pages • Latest Posts • Archive (last ...
-1
votes
1answer
64 views

Wordpress two row automatic sub navigation with double wp_list_pages. Is it impossible?

I'm working on large site with top-navigation menu for top-level pages only. Is there any way to make sub navigation menus work as on image attached? I hope the problem is in myinsufficient ...
0
votes
2answers
85 views

Ways to give a wp_list_pages menu link specific class names?

I'm looking to style my wp_list_pages with a span class. I'd like to give it a unique class so that I can give each a specific icon. 'link_before' => '<span ...
0
votes
3answers
160 views

Hide Parent if No Children

The codex provides a way to display the children and parent page for use as a sub-menu. However, this code displays the parent page in the list even when the parent has no children. How can I modify ...
1
vote
1answer
195 views

wp_list_pages - Using a Walker to customize output order

I'm using wp_list_pages to create a navigation menu. I've run into a challenge with the menu order, though, and I am trying to figure out a way to take more control over the order of the menu. Is it ...
0
votes
1answer
34 views

Adding elements to wp_list_pages (within <li>, but before <a>)

I'm working on my first wordpress theme and I'm running into some trouble. I'd like to add an extra div (which I'll style in css) within each <li>, but before the actual <a ... > element ...
0
votes
1answer
59 views

Include Custom Post Type Archive in wp_list_pages

I am wondering how to include a custom post type archive in wp_list_pages. If there were a page ID, I could simply attach that page to the list using the 'include' argument. I know that there is a ...
-1
votes
1answer
47 views

Making current_page_item work with wp_list_pages in sidebar on post pages

I'm working on a website where we have a menu in the sidebar that pulls the list of the parent for the current page, and all the children of that page. The problem is that, on pages where there's a ...
0
votes
1answer
1k views

Menu with parents, children and or siblings pages display

Here you see the parent menu selected in the horizontal navbar. I already have that working. I need a sidebar like they have with the same parent indicated plus children when they exist . At the ...
1
vote
1answer
35 views

Arrange Combined List of Pages and Categories

I'm using the code below to display both top-level pages and categories in my menu. (If this is the incorrect way to do so, please let me know). I would like to arrange the items alphabetically. The ...
1
vote
1answer
76 views

new_excerpt_more link not working properly

My "Read More" button is linking to the current page page instead of the excerpt page it is suppose to be linking to. Here is my function in function.php file: function new_excerpt_more($more) { ...
0
votes
1answer
40 views

wp_list_pages hierarchical help

So I have been searching online for something that I think is simple to achieve and I am most likely over thinking it. I have found many related articles on the matter but can't seem to get it to ...
0
votes
1answer
38 views

List all pages including archive

I'm creating a custom options page on my site. One of the options is controlling a box on the homepage and i'm trying to set the link for the item to any page on the site via a select menu. as of now ...
0
votes
0answers
25 views

wp_list_pages isn't creating .children ul in one instance

I'm trying to build a menu on child pages that is structured like this Grandparent Parent Current Page child page child page Item 2 Item 3 Item 4 For one set of parent and child pages ...
0
votes
1answer
685 views

Adding custom class names to anchor in wp_list_pages

I've the following navigation: (example) <ul id="mainNav"> <li><a href="#" class="watishet">Wat is het</a></li> <li><a href="#" ...
0
votes
2answers
48 views

Get the ID of the direct parent page

I've seen plenty of tutorials on how to get the ID of the upper-most parent, but I can't seem to find anything on how to get the ID from the direct parent. Eg; - Big John - Little John - Baby ...
0
votes
1answer
53 views

wp_list_pages change <ul> of children and anchor of parent

I am getting the list of Pages and Subpages by wp_list_pages(). I want to change the parent <a> and <ul> child. I found a solution here in this WPSE thread. But It only changes the ...
0
votes
1answer
2k views

Change ul class=“children” for wp_list_pages?

Hello I'm using this code to print a list of Pages and Subpages: <ul> <?php wp_list_pages('title_li=&depth=2&child_of='); ?> </ul> It outputs: <ul> ...
0
votes
1answer
37 views

How to use page metadata while using wp_list_pages()?

I'm creating my pages links in wordpress, using wp_list_pages(). each link contains an <i> tag which displays retina icons. I want to set a different class for each link in order to display a ...
1
vote
0answers
22 views

How to get Role Subscribe Users on Admin Menu only in Pages in Wordpress

How to get Role Subscribe Users on Admin Menu only in Pages in Wordpress and also asign pages to only a specific user and also get the pages on homepage by user ID. Example: here a link, i want to ...
0
votes
1answer
157 views

Setting multiple values to as sort_column

If I want to sort on 1) menu_order and if the pages weight the same I want to 2) sort them alphabetically, how? Is this the default behavior if you set menu_order? Is it?: $args = array( ...
0
votes
2answers
711 views

Add class to the items in wp_list_pages

I just want to add a class for the active page in the wp_list_pages().Is it possible? If so can I provide a particular class for a active page. Here is my code for listing the parent page and its ...
0
votes
1answer
188 views

How to use wp_list_pages on a grandparent page

I am using wp_list_pages to show the page structure on a website. For instance, if I use this code, it will show me the complete child / grandparent heirarchy of the current page the user is on: ...
0
votes
0answers
108 views

Adding font icons to a subnav with wp-list-pages

I am using the Font Awesome Menus plugin (http://wordpress.org/plugins/font-awesome-menus/) to show font icons next to each menu item by adding the icon name to the CSS class input. I would really ...
0
votes
1answer
121 views

Wp_list_pages not showing children with custom page template

I seem to be having problems when using custom page templates using wp_list_pages. These pages are always displayed at the bottom of the website in a menu. The problem is, that they should have a ...
0
votes
2answers
2k views

How to show only parents subpages of current page item in vertical menu?

I just can't find a way to make it possible to show only current parent items down to current page item in a vertical menu the "wordpress way". What I want to achieve is the following dynamic ...
0
votes
1answer
54 views

wp_list_pages - show pages immediately 1 level below current level

I'm setting up an events page in a wordpress site I'm building. Let's take a look at the page menu hierarchy: First of all there is a Events landing page. It will display four regions where events ...
0
votes
0answers
37 views

Different sorting for second level on wp_list_pages

I am listing all posts of a custom post type by wp_list_pages and now I want to have a different sort_order for only the first group of children. I am using this to create a really large archive of ...
0
votes
1answer
85 views

Get current post's child page?

Is it possible to find out what page a post is contained in? Im in my single.php template and im listing child pages in a sidebar using wp_list_pages, I want the page (not category) that the post is ...
0
votes
1answer
83 views

Non page link in wp_list_pages

I would like a navigation something like this. Home - People - About - Services - Contact Home, About, Services and Contact are all pages. People DOES NOT have a page, I would like to use this link ...
0
votes
1answer
258 views

How to style this wp_list_pages markup

I'm wanting to custom style the output of this wp_list_pages $children echo, here is the code: <?php if($post->post_parent) $children = ...
0
votes
1answer
302 views

wp list pages using meta box value

I am using the following meta boxes on services page but how would I get the page(s) which have value of this meta box? For example, list all pages where service_type = 'web' I am using the ...
0
votes
2answers
338 views

get all page IDs from wp_list_pages

I am looking for a way to output all page IDs from the following menu: <?php wp_list_pages('depth=1&exclude='3,5,11')); ?> Only top level pages needed, therefore the 'depth=1'. Any help ...
0
votes
1answer
32 views

Listing current pages subp page in list items in the sidebar

I'm wanting to list my current page's child pages as list items in the sidebar of my wordpress site. So far I've been referencing the http://codex.wordpress.org/Function_Reference/wp_list_pages I'm ...
1
vote
3answers
6k views

Show just one level of child pages, wp_list_pages woe

I'm working on a site that has a fairly large page structure a few levels deep - in some sections there are a lot of pages. The basic setup is something like this... Parent Parent Parent -Child ...
0
votes
2answers
110 views

Add Parent to List of Subpages

This code works well to display child pages of the parent page while viewing both the parent page and child page. It doesn't apply the current_page_item CSS class to the parent while viewing it (and ...
0
votes
1answer
37 views

Add Parent to Subpage List

Below is the best code I could find for producing a list of subpages and the parent page. However, it only shows the parent page while on the subpages. How do I get this to display the parent page ...
0
votes
0answers
56 views

List custom post type as children of page in wp_list_pages

I've got a WP site, with a custom post type set for team members (called 'people'). In the site page hierarchy, I have: About -> Team Is there a way so that all entries for the team members, are ...
2
votes
1answer
549 views

Test if page is child and has children, if so echo child pages also on grandchild pages

I am trying to show a sub-menu of child-pages only on level 2 pages (who have a parent) and if they have children. I am using the code below (made from several snippets I found), it works fine on ...
0
votes
2answers
146 views

Add ID to target navigation link

I am using the following code for a navigation bar on a WordPress website: <?php wp_list_pages("title_li="); ?> Which currently spits out some links that look like: <a ...
0
votes
1answer
42 views

How to make in post Parent page children page list nummbered

Parent page veggies Its children pages are carrots peas potato How to put in post numbered list of Parent page? Maybe better how to make same list to be ordered by date posted so some ...
0
votes
2answers
59 views

alternating classes on wp_list_pages

I'm trying to have alternating classes on the list created by wp_list_pages. Currently I have extended the Walker_page class updating the start_el function as follows: class Sidebar_walker extends ...