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
94 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
164 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 ...
1
vote
1answer
330 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 ...
0
votes
1answer
400 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
2answers
884 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
39 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 ...
0
votes
3answers
413 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
81 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
2answers
151 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 ...
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 ...
0
votes
2answers
303 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
62 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
76 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 ...
0
votes
0answers
91 views

Display a custom post type list by taxonomy term

I need to show a list of custom post type classified by terms. The idea is something like this: Service list: <ul> <li> <a href="#">Webdesign (taxonomy term)</a> ...
0
votes
1answer
406 views

Custom wp_list_pages() function

I have following code in my .php file: $my_pages = wp_list_pages("title_li=&child_of=".$my_id."&echo=0"); Then I create an <ul> <ul> <?php echo $my_pages; ?> ...
0
votes
0answers
302 views

Check if meta_key exists in wp_list_pages

I have added a custom field (using Advanced Custom Fields plugin) to a page allowing you to show/hide it with a simple checkbox, i want to filter out these pages if a user is not logged in so i am ...
0
votes
1answer
76 views

only display Pages which have children

Here is my website structure(wordpress pages) - HOME - - Tutorial - + PHP Tutorial + + Photoshop Tutorial + + Css Tutorial + + HTML Tutroial + - news - + November + ...
0
votes
1answer
669 views

Display all submenus

For a custom jquery menu I'd like to show all submenus and hide / show each on demand. However my problem is to show all submenus in the first place. As of now I am managing the first level through ...
0
votes
1answer
68 views

Showing Custom Menus in the sidebar

I want to get custom menu in my top level page and the sub pages which are not child of the top level pages. I got many examples using wp_list_pages but it requires the sub pages should be the child ...
0
votes
1answer
172 views

add a.parent in wp_list_pages

In relation to question posted here, is it possible to have an output to have something like this instead? where class="parent" is applied to the hyperlink? <ul> <li><a ...
0
votes
1answer
63 views

Show menu on page with all sub-pages and sub-sub-pages of that page

I am trying to create a menu, with sub-pages and sub-sub-pages of a current page. I want the menu to work as a dropdown, where the sub-sub-pages for a sub-pages are shown when the user clicks the ...
0
votes
1answer
39 views

WordPress function breaks widget's markup?

Here's a standard function creating widget, it displays Widget's title and echoes "test" below it: function widget( $args, $instance ) { extract( $args ); $title = ...
1
vote
1answer
281 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
61 views

remove auto generated pages from the menu?

I have a simple function that adds a couple of pages to the users website when they activate my plugin. Actually there are many plugins out there that generate custom pages for the user, plugins like ...
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> ...
0
votes
1answer
331 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
258 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: ...
2
votes
1answer
656 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 ...
0
votes
1answer
276 views

Listing Sub-Pages & Sub-Sub-Pages

So I don't really know why I am having so much trouble with this, it seems like functionality in wordpress that should be a bit easier to working with. Anyhow I need to generate a menu system for a ...
0
votes
2answers
502 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
120 views

Inset image thumbnail from page into list

I currently have 10 child pages which each contain one main image and text. I then have the main parent page, which acts as a 'contents page'. I currently have this code on the main parent page... ...
1
vote
2answers
757 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: ...
4
votes
2answers
461 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
2answers
97 views

How to prevent custom walker from creating sub navigation for pages that are not relatives of the current page?

I have a custom walker that extends the Walker class. My code uses the Walker_Page class as it's base as it does pretty much everything else I want but I need to modify it a bit so that it behaves a ...
0
votes
2answers
108 views

list child pages as slug

I have a section on my site that needs a list of pages that are descendents of a particular ID. I need them listed on the child and grandchildren pages. But the page titles are too long, so I need to ...
0
votes
1answer
127 views

Getting subpage of subpage - Custom posts

I have one page with custom posts. They are shown in one page with a list, you can choose one page and when you get to that page I need to show subpages of that page. Here is so far ive made it, its ...
1
vote
1answer
176 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
votes
1answer
135 views

Wrapping a function in html tag and return?

I am creating a shortcode. The shortcode will output a list of pages with the wp_list_pages() function. I am using the ('title_li') parameter and the list headline will be removed, because it is left ...
0
votes
1answer
87 views

Custom navigation bar via wp_list_pages is broken for blog roll

Pretty simple question. I have the 'blog' on my site set via 'reading' to be the page 'blog' located at mysite.com/blog. /blog is hierarchical, in that it has children. I have a custom side bar ...
1
vote
0answers
61 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
232 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 ...
0
votes
1answer
201 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
34 views

Is it possible to append an external html file to my wordpress navigation?

I'm trying to add a hardcoded 'megamenu' style dropdown div to my wordpress site. The content of the div itself doesn't need to be administered via wordpress, it will all be hardcoded. I don't want ...
1
vote
1answer
1k 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 ...
0
votes
3answers
412 views

Exclude current page in wp_list_pages

I'm using wp_list_pages() to display a menu of child pages. The structure is nice and simple. Looks like this: http://cl.ly/image/0w1Q1q2D3D18 The menu works perfectly when on a child page: ...
0
votes
1answer
95 views

Second tier sidebar navigation

I'm trying to create a second level navigation in WordPress. I've found lots of examples, but none of them seem to do exactly what I want. This code below has me almost there, but I want an active ...
1
vote
1answer
1k 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
1answer
144 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 ...
1
vote
1answer
93 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 ...
0
votes
1answer
357 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 ...