The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
271 views

Redirect to first child on Custom Post Type (without template)

I need to redirect to the first child page in a hierarchical Custom Post Type. For the love of me I have scoured high and low, but all the solutions seem to involve applying a template to the parent ...
0
votes
1answer
65 views

How to display childrens custom fields?

I need help, I have a page that I want to display content from the page children, I get the content but not the custom fields! I've tried this but it dosnt work, what am I doing wrong? <?php ...
0
votes
1answer
12 views

Show list of Child Post in Parent Post

I have created custom post type. I have posted a parent post and it has a few child posts as well. On the Parent post, I want to show its children posts. How can I achieve it?
0
votes
2answers
57 views

Load child template based on parent

I have child page templates that need to be automatically applied based on the parent template. I'm wondering if there is anyway Wordpress handles this. This is the solution I came up with. (in ...
0
votes
1answer
71 views

Parent Page > Child Page Menu

I am trying to create a collapsible menu using Bootstrap. The problem I am having is getting the correct Wordpress PHP code to call the right pages. Also this menu will be displayed on these child ...
0
votes
2answers
49 views

List subpages in order

This may be a very basic question, but I'm a beginner. How can I list my subpages in alphabetical order? I have 14 subpages total. This is what I was told to use but my page is a mess. [subpages ...
0
votes
1answer
104 views

Set order of returned items in the WP_Query() class/function

I have this function which gives me IDs and titles of all child pages of a given parent ID. function getPageChildren($page_id) { $my_wp_query = new WP_Query(); $all_wp_pages = ...
0
votes
1answer
139 views

parent page grabbing wrong url for child pages - get_page_uri($pageChild)

I have a landing page that pulls in an excerpt, title and thumbnail of its children. It works, except the title (which is the page title) link is doubling up the parent folder in the url it creates. ...
0
votes
1answer
203 views

Listing all child-pages of a parent-page on the parent-page and each child-page?

I have a parent page called "About". This page has three child pages "Members", "Information", "Contact". I want to list all the child-pages on all four pages, also the parent-page. So right now I ...
0
votes
1answer
276 views

Get list of all Grandchild Pages

I have the following page hierarchy, all of which are under a top page (TOP) with ID = 1: mid1 gc1 gc2 mid2 gc3 gc4 I would like to make submit WP_Query query that will return random pages ...
0
votes
2answers
537 views

Delete Child Posts

I'm trying to delete all child posts when the parent is deleted. The parent post deletes just fine, but the child posts are not properly deleting. Here's the code I have in place now: $args = ...
0
votes
1answer
214 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
2answers
616 views

Display posts of custom type in hierarchical order

I has custom field 'People' and I have parent pages(post types) and child pages (post types). This is my code: <?php $args = array( 'post_type'=> 'people', 'posts_per_page' => -1, ); ...
0
votes
1answer
384 views

If/Else child list for Custom Post Type single template within loop?

I'm trying to add a feature to my 'Services' custom post type single template that displays one thing if the post type has one or more child post types and another thing if it doesn't. So far I've ...
0
votes
1answer
390 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
2answers
153 views

i want to get the parent id, only on parent -> child -> child page

here is Hierarchy Parent (id=34) Child Child of child-1 Child of child-2 Child of child-3 Child of child-4 I am at child of child, i Just want to show sibblings of child of child ...
0
votes
2answers
1k views

Exclude child pages args array

I have the following code and need it to exclude the child pages of a page ID; <?php $args = array( 'post_type' => 'page', 'post_status' => ...
0
votes
1answer
23 views

Adding title and description to subpage's featured image

Hej! I have a subpage to display it's subpage featured image. I would like to add the title and description to beneath the thumbnail. Today my code look like this > In the functions.php function ...
0
votes
1answer
40 views

Display thumbnail of child, parent and ancestor using featured thumbnails

I have tried to achieve that the Home page displays featured images of all it's child pages and in turn some child pages are displaying the featured images of their child pages. This is my code so ...
0
votes
2answers
70 views

Using pagination with get_posts on page type

Is there a way to use pagination on a page query like with posts? Here is the code I'm using: $listingPages = get_posts( array( 'cild_of' => '7', 'meta_key' => 'Type', ...
0
votes
0answers
42 views

Custom Post Type Child Pages

I'm getting a 404 page when viewing child-pages of a custom post type. Right now I have a pages (let's call it 'Books') that displays every 'book', and in the menu have other pages listed under Books ...
0
votes
0answers
23 views

Change the Featured image for child posts

I have created two post type for my website ("product" and "variation"). Each variation has a feature image and their post parent is a "product" post. I would like to be able to change the different ...
0
votes
0answers
23 views

Subfolder index.php 404 Errors

I'm looking for help troubleshooting why subfolder pages return a 404 error if "index.php" is appended after the subfolder. I do not experience this behavior on other WordPress sites. I have inherited ...
0
votes
0answers
35 views

How can I give Wordpress child custom post type the same title and slug as its parent?

I have two custom post types, one is the child of the other (the parent is more of a modal post). I want the child post to inherit the same title and slug as its parent. I've tried to use the ...
0
votes
1answer
18 views

How to check if the current page's parent is one of 2 different ID's

I'm using this little snippet right now to check if the current page is the child of a particular page; $studies_parent = 5860; if ($studies_parent == $post->post_parent) { Which is working ...
0
votes
1answer
41 views

Get post_meta of children and compare to current page ID

I am stumped on a bit of php code in my template. I have a custom field named "services" with a value such as "2402, 2366, 78" These are page ID's. In my template I want to do the following: Get any ...
0
votes
1answer
53 views

How to paginate a list of child pages

I am using the following code to list the child pages of the current page being viewed. But it only outputs the last 5 child pages; i want it to list all pages in blocks of 5 with "next" and ...
0
votes
1answer
33 views

How to accomplish a child page navigation?

I'm not finding any info on this, so I'm probably wording it incorrectly in my search. So I'm hoping someone can point me in the right direction. I have 50 pieces of content that'll be going on my ...
0
votes
0answers
21 views

Wordpress Programmatically create subpages when a certain page template is used

I've been fiddling for quite some time now but can't seem to figure this out. What I am looking for is this: One creates a page and set it to use a certain page template, say: "Shop Owner" WP ...
0
votes
0answers
14 views

Hereditary Subpages Nav

I'm trying to create an automatically generated navigation using Wordpress child pages - which will only show the next child pages down from the selected one (example page). You'll see that I can get ...
0
votes
0answers
13 views

Can you group pages associated to a specific parent menu item in the admin area?

I'm creating a site that has many neighborhood pages (27) and each of those neighborhood pages has a link to a Points of Interest page, History page, and Gallery page. Would that mean that at the end ...
0
votes
2answers
709 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
0answers
157 views

displaying child pages in columns when on a parent page

I would like to display sub pages in columns. Some parent pages have a lot of sub pages and the scroll is very long. I am currently using the below code to display sub pages. ...
0
votes
1answer
66 views

buddypress/wordpress dashboard pages vs website pages

trying to understand the buddypress/wordpress codex : in the admin dashboard/all pages,i can see only the main/parent pages like events groups members … now when i want to customize the inner pages ...
0
votes
1answer
84 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
0answers
39 views

Detecting top parent category fails on home page

I have the following method to detect a top level category. But it fails on home page returning alway true. //detect parent category function in_parent_category($cats,$_post=null){ foreach ...
0
votes
0answers
55 views

404 error on second page load for child-pages

I have a strange problem which I really do not understand: My site has the page community and a sub-page called test. Permalink structure is set to /%postname%/ So the URLs for the pages are: ...
0
votes
2answers
326 views

Display child pages on a parent and child page using Featured Thumbnails

How would I display a list of my child pages using featured images on a its parent page as well as its other siblings child page? For example, if my parent page is called 'Music', I'll have my main ...
0
votes
0answers
64 views

Child Pages on Mobile/Touch Screen not clickable

I have child pages under parent pages in page menu/header, they work fine when using a PC, but I cannot get them to work when using a mobile phone or touchscreen device such as an iPad. I am using ...
0
votes
1answer
42 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
658 views

Child Pages Loop

If anyone can help that'd be great. I've found a snippet of code that I've used which is pretty much doing what I want it to do, which lists out subpages of the parent, adds a thumbnail if there is ...
0
votes
1answer
80 views

Wordpress child pages not working

I am creating a wordpress CMS and I have added multiple pages under one parent page. I am generating the links for all the child pages of a page and then when user clicks on the links, they should be ...
0
votes
1answer
150 views

Displaying child page content of a certain parent

What I would like to do is to create a WP loop that will display info from a child page of an adult page ID, so the Page ID is 2. I would like to pick a page ID to display what page. So that way I ...
0
votes
1answer
188 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: ...
0
votes
3answers
1k views

Show content if parent page has children

Using this piece of code you can show content depending if it's a child-page or not: <?php global $post; if ( is_page() && $post->post_parent ) : ?> This is a child-page. <?php ...
0
votes
1answer
166 views

Query in a Hierarchical Custom Post Type for Children vs Siblings

I have a custom post type with two levels of pages inside of it. the parent level we'll call parent, and child - child. The parents need to be able to pull in their children, and the children need ...
0
votes
1answer
120 views

404 on child page template

I have a page called portfolio and I have created several child pages for it like Video page, audio page etc … I also created custom page template for portfolio and named its file ...
0
votes
1answer
394 views

get permalink of page children in loop

I have some landing pages that show the page title, feature image and excerpt of their children. The image is linked to the child page, but I need the page title linked to the same place - and I can't ...
0
votes
1answer
722 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
330 views

Display the latest content from subpages of another page

I know how to display content from one page on another page. Here is the code I use to display the last three video-titles, submitted to my video-page, on another page (using Advanced Custom Fields ...