The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
15 views

Display Tags of Child Pages

I'm trying to display tags of child pages on the parent page. In my functions.php: // add tag support to pages function tags_support_all() { register_taxonomy_for_object_type('post_tag', 'page'); } ...
2
votes
1answer
484 views

Keeping parent menu items active in child pages

I'm a begginer in php and css. I would like to know how to keep an top-menu item underlined while navigating on child pages. Here is my layout: I have a navigation menu, listing all my parent pages ...
0
votes
1answer
14 views

Firing page_publish where page is child page

I'm having difficulty getting a function to fire when publishing a new page. I'd like it to fire when a new page is being published or edited but ONLY when that page has a parent. Here's what I've ...
0
votes
0answers
9 views

Autogenerateing associated page on parent custom post type publishing

Goal: Automatically generate a child page whenever a custom post type ive created is published. Creation (and publication) of the main post type is done using a frontend form using the ...
2
votes
2answers
1k views

Remove parent slug for child pages

I'm looking for a plugin/custom function that removes the parent slug of a child's page permalink. Something that automatically changes the permalink for child pages. Example: ...
0
votes
2answers
74 views

Custom post type child page 404

This issue seems to be quite common, but the solutions that worked for others haven't worked for me. I'm using the CPT UI plugin and have created a CPT called 'courses' with the following settings: ...
0
votes
1answer
46 views

How to display list of child pages of parent page in wordpress?

I have following format of menu. Treatment -Beauty --Services --Products -Surgery -washing I have followed follwed following link: How to Display a List of Child Pages For a Parent Page in ...
2
votes
3answers
138 views

Page as a child of a Custom Post Type

I have a custom post type called "Professions", it contains different professions and info about them. To show them I simply use a content-profession.php -file. The thing is that I need subpages ...
0
votes
3answers
29 views

Deleted pages showing up when querying for child pages

I'm using the following code to display the featured image, post_title and custom field data from relevant child pages. <? $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ...
0
votes
1answer
885 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
0answers
19 views

Theme-Option-Panel: Select List of Pages, Childpages and Posts

I just can't solve this problem: in the wp dashboard I want the user to have the option of selecting between all pages, sub-pages and posts (also custom-post-types) for displaying them in special ...
0
votes
1answer
44 views

How to finish this loop?

I had already asked a question of how to get only get the child pages of a parent page that belonged to a certain taxonomy. A very helpful user gave me the answer to this, however, I was not provided ...
0
votes
0answers
32 views

How to configure a child-post of a parent-post to have hierarchical sub-posts?

Question: What plugin or coding configuration needs to be implemented to create this child-post to parent-post hierarchical, many-to-many post relationship? Goal: To be able to create sub-posts of a ...
0
votes
1answer
68 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: ...
1
vote
0answers
24 views

Weird behaviour on Edit Menus screen

I am running WP 3.9.1. Fresh install. ACF and Gravity Forms are the only two plugins running. Perhaps someone had this issue before... On the edit menu screen I have a tab called "View All" where I ...
0
votes
2answers
606 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
1answer
31 views

Can I make Wordpress use a custom template for a child page

I have a custom post type called communities. Then I have the appropriate single-community.php page. Works great! So we want to use some of these "communities" as parent pages. Then underneath them ...
3
votes
2answers
922 views

How can I programmatically create “child” pages on theme activation?

I know how to create pages automatically when a theme is activated, but I need help to figure out how to also programmatically create child pages at the same time. For example: - Page 1 - Page 1.1 ...
1
vote
1answer
347 views

Automatically create child pages when saving a (parent) page

I have a bit of a tricky one... I have a hierarchical Custom Post Type ('shows') that represents events. Is it possible for the user to create a new page (ie show), save the page and for Wordpress to ...
1
vote
3answers
75 views

Multiple Conditions for Child Page Title

I've been trying to work with Conditional Tags and cannot wrap my head around this problem. PHP novice here. On sub-pages I need to display the parent page title as well as the page title. I have it ...
0
votes
1answer
44 views

How to list a page tree?

I have this structure for example: Page 1 Sub-Page 1.1 Sub-Page 1.1.1 Sub-Page 1.1.2 Sub-Page 1.1.3 Sub-Page 1.2 Sub-Page 1.2.1 Sub-Page 1.2.2 Sub-Page 1.2.3 Page 2 ...
1
vote
1answer
52 views

Injecting a custom sql query into a page/theme

I have written a custom sql query for our WordPress website (fairly elaborate and not achievable with the standard wordpress code) and I've got it to run via $pageposts = $wpdb->get_results($query, ...
2
votes
0answers
314 views

Create child page within custom post type

I want to be able to have a link like this, site.com/my-custom-type-slug/single-custom-post-name/stats/, where /stats should contain the /my-custom-type-slug page content and when I add content to the ...
0
votes
1answer
81 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
86 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 ...
-2
votes
1answer
16 views

How to Hard Set the Parent Page in Template

This template displays child pages of the parent page that calls it. I need to modify it to hard code the parent page to a specific parent, using the slug or other means. Once I know how to do that ...
1
vote
2answers
526 views

Can't change parent page

Some of my pages are children of "home". I want to assign them to a new page. But I cant change the pages parent. Everytime I try and publish, it just switches back to "home". I am using the ...
0
votes
2answers
823 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', ...
1
vote
2answers
36 views

Listing subpages title and content and styling the first iteration differently

So for now, every iteration looks the same and it's been a while since I dealt with php so could you help me? <?php $pages = ...
0
votes
1answer
25 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?
1
vote
6answers
3k views

Prev/Next child navigation for current page?

How can I get a Previous / Next navigation that only navigates the child pages of the current page? By that i mean url.com/page/child1, url.com/page/child2 and so on.. I've been searching around ...
0
votes
0answers
166 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
2answers
635 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
0answers
24 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
50 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
71 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
2answers
130 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
2k 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
26 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 ...
1
vote
0answers
12 views

query pages by a childs publish date

I am currently working on a wordpress project and would like to know if its possible to query pages by a childs publish date? I currently only want to show the parent page so my arguments look like ...
0
votes
1answer
73 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
138 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 ...
2
votes
1answer
726 views

Paginate Child Pages Content on Parent Page

I am using the following code to display child page content on it's parent page. The code is working great, but it currently only shows the latest two child page posts, is there any way to display all ...
0
votes
1answer
51 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
2answers
134 views

List of child custom post types lists all custom post types

Several of my pages have some "posts" of custom post types as child posts. On these pages I want to list all of the child posts. Therefore I have this code: <?php $page_id = ...
0
votes
0answers
45 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 ...
2
votes
2answers
654 views

Custom post type hierarchical permalinks not behaving as expected for parent/child pages

When you have Pages with children, the permalink structure works something like this: example.com/parent-page/child-page/ All well and good. Trying to go to this URL: example.com/child-page/ ...
0
votes
1answer
115 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
0answers
15 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
2answers
1k 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 ...