0
votes
2answers
728 views

Add class to the items in wp_list_pages

I just want to add a class for the active page in the wp_list_pages().Is it possible? If so can I provide a particular class for a active page. Here is my code for listing the parent page and its ...
0
votes
1answer
85 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
43 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
1answer
189 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: ...
1
vote
1answer
138 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, ...
0
votes
1answer
728 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
1k 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 ...
0
votes
1answer
215 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
394 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 ...
1
vote
1answer
889 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 ...