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

7
votes
4answers
192 views

How can I hide children of draft pages using wp_list_pages()?

I'm displaying a simple sitemap with wp_list_pages(); $args = array( 'sort_column' => 'menu_order', 'title_li' => '', 'post_status' => 'publish' ); wp_list_pages( $args ); ...
4
votes
2answers
416 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: ...
3
votes
3answers
3k views

How to hook wp_list_pages?

How can I hook the wp_list_pages function so that it reads a value of a custom field and displays it instead of displaying the page title?
3
votes
1answer
1k 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 ...
2
votes
1answer
595 views

dynamically limit depth of wp_list_pages

I guess that this should be an easy one but I haven't yet find the proper solution. I want to limit the depth of wp_list_pages so as not to display the pages of the last level. So supposing that ...
2
votes
1answer
174 views

Manipulate Output of wp_list_something: select menu instead of li's

I'm working on a responsive webdesign where my navigation should swap into a select-menu when resizing the window in smaller sizes. Is it somehow possible to add another param to functions like ...
2
votes
0answers
241 views

wp_list_pages sort order is different for different languages [closed]

I'm using the following code wp_list_pages(array('exclude' => '','title_li' => '','sort_column' => 'menu_order')) If I switch the language the sorting is different. One of the main menu ...
2
votes
0answers
544 views

Hierarchical Custom Posts - Highlighting Current Post in Sub-Menu

I have created a hierarchical custom post type called events and have used wp_list_pages to list the sub-posts for each event post (See below). This navigation works great, but I cannot figure out how ...
2
votes
0answers
191 views

Conditional styling of wp_list_pages bullet points [closed]

I'm looking for some type of script that allows me to select custom image bullets for my wp_list_pages for 3 scenarios: If a page does not have a child If there are children If a page was recently ...
1
vote
1answer
260 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 ...
1
vote
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> ...
1
vote
3answers
7k 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 ...
1
vote
3answers
121 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 = ...
1
vote
1answer
46 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
2answers
679 views

wp_list_pages: only show subpages on the parent page?

I'm using wp_list_pages('title_li=') on my site. Some of my pages do have subpages, however I don't want to list them unitl I'm on an actual parent page that has subpages. So imagine my front-page: ...
1
vote
1answer
110 views

I need ideas for a complicated menu

I have a slightly complicated menu to code from PSD document and integrate into wordpress. this is how it looks: (link in the comment bellow) The result of my work is this: ...
1
vote
1answer
180 views

List pages within a certain parent and show published month

How can I list all pages within a certain parent (ID=917) and show the month and year they were published in this format: Aug 2011 This is a page (link to page) This is another page (link) Jul ...
1
vote
2answers
110 views

Change Parent Name with wp_list_pages?

I use the following line in a code which outputs subpages and a parent. This code outputs the name of the parent page. I would like to replace this with the word "Overview." How do I achieve this in ...
1
vote
1answer
165 views

List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?

I have the following function that lists all Child-Pages of a page. function show_subpages() { global $post; $subpages = wp_list_pages( array( 'echo' =>0, ...
1
vote
1answer
217 views

Populate meta select box with child pages

I'm trying to populate a drop down select meta box with a list of child pages of that page. I am using the wp_list_pages function to retrieve the list of child pages, no problem there. The problem ...
1
vote
1answer
709 views

Make wp_list_pages print slugs instead of titles

By default wp_list_pages spits out an unordered list of post titles. To save space in a sidebar menu I´m trying to create a list of page slugs instead of page titles. I suppose I´ll need to write a ...
1
vote
1answer
2k 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
1k views

wordpress wp_list_pages help

In my wordpress enviroment, I have a number of pages, and I also have a custom post type called casestudy. I have setup a page-clients.php that has some of it's own content on, I then use the ...
1
vote
1answer
991 views

how to properly list child pages in sidebar?

My pages menu is maximum 3 levels deep and I am having a hard time figuring out how to properly list the child pages in the sidebar. If a page is a parent I want to list it's direct child pages and ...
1
vote
0answers
37 views

Get Parent List Class for Child Pages Using Walker

I'm having trouble getting child pages to use the parent li class whilst using wp_list_pages(). I'm using a walker to get the list classes to use page title, but no matter which way I try, I can't ...
1
vote
1answer
163 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) { ...
1
vote
0answers
26 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 ...
1
vote
1answer
300 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
0answers
60 views

need help with existing code showing subpages

I am helping a friend make some changes to a wordpress theme. At the moment displaying subpages works only for one parent and its subpages (the one with id 31), but we want it to work for all pages ...
1
vote
1answer
937 views

How to remove the HOME menu item

I am using wordpress 3.4.1. I am mainly creating a static site and for that have created and arrnaged the pages, and wordpress has nicely created the pages in proper nav-menu format for me, which is ...
1
vote
1answer
976 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 ...
1
vote
1answer
92 views

List subpage of subpage

I've got a site with the following structure: About Page 1 Page 2 Page 3 Page 3.1 Page 3.2 So Page 1, Page 2,... are subpages of the About page. I would like to have a sidebar that lists the ...
1
vote
2answers
465 views

wp_list_pages() but only show children on the branch you are on

Lets say I have this menu: Top |___ Sub 1 |___ Sub Sub 1 |___ Sub Sub 2 |___ Sub Sub 3 |___ Sub Sub 4 |___ Sub 2 ...
1
vote
1answer
204 views

wp_list_page with something like showpost

I'm using this code <?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); $subpages = ($post->post_parent) ? ...
0
votes
3answers
52 views

Custom Post Type Name Causing Problem

Please ignore my poor English. I have custom post type (order). and its working like charm, But default post type (pages) list are not displaying in wp-admin side. You can see More information in ...
0
votes
2answers
90 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
2answers
744 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
2k views

Add filter to wp_dropdown_pages() or wp_dropdown_categories() - no select container?

I'm working with wp_dropdown_pages() and wp_dropdown_categories() and both are always outputting a <select>-box with its <option>s as items. Is it possible to add a filter/hook to this ...
0
votes
1answer
267 views

query posts and split meta information into separate div's

I'm trying to replicate the functionality of the content showcase/slider seen here: http://stylewatch.stelladot.com/ From what I see in the HTML, it appears that there's 2 divs, one with the post ...
0
votes
1answer
2k views

Is there a way to make a custom Page type?

In a theme I'm building, there are two main types of page. One is a product-gallery, one is for general info. I'd like to use wp_get_pages() or wp_list_pages() twice in the sidebar, one with a list of ...
0
votes
1answer
16 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' => ...
0
votes
3answers
354 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 ...
0
votes
1answer
67 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
1answer
296 views

Extra title output with this function wp_list_pages

here is the code : add_shortcode ('get_menu_child','get_menu_child'); function get_menu_child ($att) { global $wp_query; $thePostID = $wp_query->post->ID; $output = ...
0
votes
1answer
190 views

wp_list_pages() refuses to output posts

Someone help me understand why the following do not output anything: wp_list_pages( 'post_type=post' ) wp_list_pages( 'post_type=event' ) Yet the following work as expected: wp_list_pages( ...
0
votes
1answer
136 views

Exclude pages by menu order

i have a "Default Page Generator" on theme activation i have created... in that file i set 'menu_order' for each page. i want to exclude pages with menu order bigger then 50 from the default ...
0
votes
2answers
520 views

Exlude pages from wp_list_pages

in a blow I'm working on there is a navigation menu made of pages and subpages. I didn't code it, so I'm not completely sure how it works, but after reading some code it seems that the menu is ...
0
votes
1answer
239 views

Load parent pages when there are no child pages

I use the following code to load subpages in a sidebar on all pages: <?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0&depth=1'); ...
0
votes
1answer
326 views

active parent page when clicked on childpage

Hi there Wordpress guru's, i running up against a problem. I've my parent pages in the header.php and childpages in page.php. when i clicked on one of the subpages in a parent page i want that my ...
0
votes
1answer
20 views

WP List Pages - Add Title Attributes to Anchors

Using the default wp_list_pages() is there an easy way / filter to add title attribute to the anchors? Right now it just spits out the anchor with no title attribute but I would like to add it on ...