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.
3
votes
0answers
163 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:
...
2
votes
1answer
34 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
117 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
100 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
137 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
401 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
165 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
3answers
1k 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?
1
vote
3answers
3k 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
1answer
100 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
161 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
1answer
95 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
126 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
436 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
672 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
694 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
46 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
329 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
72 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
0answers
259 views
add alt and title attribute to wp_list_pages
For building my menu's, i'm using wp_list_pages. But i just found out that no alt/tittle attributes are rendered.
Unfortunately, with my php knowledge, i can't fix it. But it must me possible to get ...
1
vote
2answers
228 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
161 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
938 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
174 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
561 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
25 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
18 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
75 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
180 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
238 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
2answers
22 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
1answer
32 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 ...
0
votes
1answer
354 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
2answers
184 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:
...
0
votes
2answers
52 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
1answer
84 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 ...
0
votes
1answer
93 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
3answers
181 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
179 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
226 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
1answer
137 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
481 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 ...
0
votes
4answers
227 views
Drag posts and pages so you can sort them in order
So has anyone done this? can be done? On wordpress admin, when you click List Pages, or List posts, I want to make a drag&drop in order to sort the pages/posts, but before I start I want to know ...
0
votes
1answer
263 views
$item->url not retrieving url in custom walker?
I've made a custom walker to use with wp_list_pages to modify the output to have thumbnails show. The goal is to have a list show up in a page template, which lists all children with their children.
...
0
votes
1answer
157 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
204 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 ...
0
votes
1answer
307 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
113 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 ...
0
votes
1answer
92 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
144 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')){
...