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

3
votes
1answer
932 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
238 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
55 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
73 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
82 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
316 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
242 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
69 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
598 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
66 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
165 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
60 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
38 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
244 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
58 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
277 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
229 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
572 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
206 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
430 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
106 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... ...
0
votes
2answers
654 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
408 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
95 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
97 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
120 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
163 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
120 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
86 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
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
216 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
185 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
33 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
912 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
343 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
92 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 ...
0
votes
1answer
927 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
133 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
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 ...
0
votes
1answer
343 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
1answer
301 views

Add classes + taxonomy terms to wp_list_pages() output

I'm outputting a list of pages in my custom post type — a kind of tree — using wp_list_pages(). All's going well, except now I want to put some classes in the li's for styling. Even that's not going ...
0
votes
2answers
528 views

Sub Navigation in Sidebar

Testing Site: http://www.indysouthportdental.com.php5-1.ord1-1.websitetestlink.com I only want to display the children of parent in the sidebar when viewing any pages within the parent. For example, ...
0
votes
2answers
501 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
310 views

Can you exclude child pages of a specific parent within a navigation?

For example, I'm using wp_list_pages to display the navigation, the child pages (and their children) appearing on hover as is typical. However, I want one of these parents to not display the children. ...
0
votes
1answer
1k 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 ...
2
votes
1answer
168 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
229 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 ...
0
votes
1answer
262 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
847 views

Single-page wordpress theme navigation

I'm trying to build single-page theme. I want user to navigate thru menu with anchors (for example <a href="#About">About</a>). I've extended Walker for wp_list_pages so it outputs anchors ...