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

1
vote
2answers
433 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 ...
0
votes
1answer
228 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
352 views

wp_list_pages() not showing on posts

I have the following code showing up a sub-menu on my website (in my header.php file) that shows all well and good, however when I open up a post it dissapears: <div id="dep-menu"> <?php ...
3
votes
3answers
2k 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?
0
votes
1answer
294 views

current_page_item and custom post type?

I have a page on my site that lists all posts for my custom post type 'Literature'. However when I click on one of the posts, the highlighted active menu item changes to 'Blog'. How do I assign ...
2
votes
0answers
534 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 ...
0
votes
1answer
527 views

wp_list_pages by taxonomy?

I need help creating a Walker for wp_list_categories that filters through taxonomies and actually lists the pages at the end element. I'm completely lost on how to go about this. I've successfully ...
2
votes
0answers
189 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
votes
1answer
364 views

Walker Class : extract function and wp_list_pages

I'm just analyzing my custom Walker Class because it frequently skips over some post_meta data that I append to the $output HTML. Even though the Custom Fields are set, they are ignored by the ...
0
votes
1answer
113 views

wp_list_pages Format only on Recently Modified Pages

wp_list_pages can be a great tool for displaying a tree structure. You can specify the depth, child of, and show_date of when the page was last modified. However, if I want to only show the date for ...
0
votes
1answer
434 views

Check if page has subpages

I'm try to build a menu with wp_list_pages() that must work like this: Main Page -Subpage1 -Subpage2 I check if the Page has_subpage and i can see the 2 subpages when i'm in the Parent ...
0
votes
1answer
175 views

wp_list_pages bug in “number” parameter

I'm trying to build a list of the first subpage out of 10 pages. So my page structure is this: Page A Page A1 Page A2 Page B Page B1 Page C Page C1 Page C2 Page C3 And I'd like to display ...
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
1answer
107 views

Parent/Child pages

I find that the parent/child pages in the "Pages" area of WordPress has become a bit confusing since the introduction of the new menu creation area. Using the new menu system, as far as I know I can ...
0
votes
1answer
183 views

How to apply the 'current_page_item' class to an archive page in `wp_list_pages()`?

So I have the following custom wp-query working on my site: function custom_front_page($wp_query){ if($wp_query->get('page_id')==get_option('page_on_front')){ ...
1
vote
1answer
202 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
1answer
466 views

How to use custom fields to replace top-level parent title with an image using wp_list_pages?

I'd like to integrate get_post_meta into the wp_list_pages mix so that any top-level parent list items get replaced with images ONLY when a key exists in the post's custom fields section. I can't do ...
0
votes
2answers
344 views

Targeting specific instane of wp_list_pages

I have several menus generated on a page using wp_list_pages. I want to add a class to the last menu item on only one instance of these. For example, I have a menu here: <ul id="headerlinks"> ...
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
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
372 views

horizontal menu / 4-level depth

I need a 4-level horizontal menu. which is the best way to build, organize and style it? "Active" tabs should be highlighted. <?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ...
1
vote
1answer
109 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: ...
0
votes
1answer
314 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 ...
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 ...
0
votes
1answer
723 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
1k views

How should I set up a Tumblr blog at a WordPress Page?

I am developing a site for a client, let's call it whatever.com. He wants to have his Tumblr blog at whatever.com/blog. (Tumblr lets you name the URL at which your Tumblr page will be served, and if ...
1
vote
1answer
996 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 ...
0
votes
1answer
360 views

add slug of child(ren) to li using wp_list_pages

For a page template I am trying to include the 3 children of each page. That works fine. However as I want to include a different image for each of the children, I would like to add the slug of each ...
0
votes
2answers
140 views

Disable the link on certain pages

I currently have a site with two levels of navigation. I am styling the wp_list_pages() list to act as my navigation. I would like to disable the link on some pages which have children (not exclude) ...
1
vote
1answer
954 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 ...