Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [child-pages]

The tag has no usage guidance.

0
votes
0answers
9 views

Creating a child page with the parent set as the front page results in strange permalink

I'm not sure if this is a bug by the theme author but when I try to create a sub page (child page) with the front page as the parent, the resulting permalink includes the name of the template. This ...
1
vote
1answer
12 views

How to get specified parent page title in my function

Below I have a function that prints the child pages of a parent. I am trying to obtain the specified parent pages title as a h2 above the unordered list. I have tried updating the title_li and also ...
1
vote
1answer
13 views

List child pages of specific page using shortcode

I have written the function below to list the current pages child pages. Now what I am trying to do is list the children of a specific page using its slug in the shortcode. Is it possible to sneak an ...
0
votes
0answers
17 views

Standard Page Child of CPT Not Found (404)

I am about to lose my mind figuring this out. I have a custom post type called "portal" and posts of that type can be the parent of a standard page. To accomplish that I've written code that adds the ...
0
votes
0answers
27 views

Child pages with the same slug

I have an ecommerce website which is running on wordpress and the woocommerce plugin. I sell car accessories and I have some problems with the structure of the sub-category urls and slugs. I tried to ...
0
votes
3answers
57 views

WP_Query returns different results from get_posts() [closed]

So I have two code snippets, trying to get the child pages of the current page. The current page is "Sample", and the following code lives in page-sample.php. The first snippet uses get_posts() $...
0
votes
1answer
22 views

Creating navigation out of specific IDs and their children?

I'm looking for a way to list three specific pages in a nav-menu (I want to get these pages by their unique page ID's), and also list the children of these three pages - appended to each list item, in ...
0
votes
0answers
11 views

Finding and removing a particular page that shouldn't be active

So I have rogue pages that are in my site, that shouldn't be there. Using a theme, and these are left over from the theme I believe. I'm new to wordpress, and I'm trying to figure out how to find the ...
0
votes
0answers
18 views

Creating navigation menu out of page-related parent/child/grandchild relationships

I am trying to create a sidebar navigation menu, that detects what pages are related to the page you are currently viewing, and then outputs the whole hierarchy of this family-tree inside a tiered ...
2
votes
1answer
12 views

Query children and parent title

i'm query child pages of a page ID. How can i echo the parent page where it says "PARENT TITLE ? Using <?php echo get_the_title( $ID ); ?> is not an option. <?php $args = array( '...
0
votes
1answer
20 views

Child and Parent Pages list of sub pages

I have a parent page called services with children, each service child has child pages within it. On the first level child page i want to show all of the pages below it in. When i click through to ...
0
votes
1answer
53 views

Create a list of pages excluding children of selected page

I am looking to find a way to create a list of the IDs of children pages from a selected page. My goal is to use the list of IDs so that I can exclude them from the following function: wp_list_pages(...
1
vote
0answers
13 views

How to display all subpages and short by year

How can I display all child-pages and short by year in Wordpress For example: all subpages in 2016, 2017, 2018: • 2018: ----- Subpage A ----- Subpage B ----- Subpage C • 2017: ----- ...
0
votes
1answer
40 views

WordPress Betheme: Unkown subheader image of a child page

I want to get the URL of the Muffin Betheme subheader image of a child page, in the parent one, for each of its children. Thus, I go through the children, then I try to get the subheader image for ...
0
votes
0answers
18 views

How do I list subpages in post editor view?

I have many pages, each with many subpages nested up to 5 levels deep. In order to find a specific page in the administration panel, I can search for it on the list of all pages. The search results ...
0
votes
1answer
27 views

If page or sub page not working as expected

I would like to display a specific dynamic sidebar the the "about" page and its children. From the codex, I have tried the following: <?php // Begin main loop if ( have_posts() ): while ( ...
1
vote
2answers
40 views

How to show child page without providing ID so it's dynamic

So this is my code. This piece of code shows me the child page titles. But i'm providing the ID from the parent page. Is there a way to make this dynamic? I don't want to use the ID cuz then its ...
0
votes
0answers
7 views

Statically populate menu with childs

My problem is very simple. I want to add all pages and subpages of a given parent page inside a menu. The problem is that the few plugins I found for this purpose, JC's Submenu or Gecka Submenu, do it ...
0
votes
1answer
162 views

Get Top parent url

I have the following structure: TOP PAGE SUB PAGE 1 --- SUB SUB PAGE 1 --- SUB SUB SUB PAGE 1 ---- SUB SUB SUB SUB PAGE 1 --- SUB SUB SUB PAGE 1 --- SUB SUB SUB PAGE 1 ---- SUB SUB SUB SUB PAGE 1 ...
0
votes
0answers
20 views

Display child page featured image on parent page and link together

I have a parent page that is based on Template A. Under this page is a child page on Template B - on this page goes the content and has a featured image that I need to get on parent page. So the idea ...
1
vote
1answer
24 views

Child theme does not load all style

I know this thing has been posted several times now, but I can't figure it out. I am asking for your help. I have created theme child before, for other WordPress themes, but this one is giving me hard ...
3
votes
2answers
75 views

Get custom field value from Grandparent Page for Parent and Child Pages

I've created the following pages and hierarchy: Grandparent Parent Parent Parent Child Child Child Parent Parent Grandparent The Grandparent pages have an ACF custom field to pick the colour. I'...
1
vote
1answer
30 views

Programmatically add existing pages and subpages to Appearance Menu

I have inherited a site with over 600 pages/subpages. I plan to use a plugin to change the way the navigation displays but it requires the pages to be in the Appearance -> Menu in this page: /wp-admin/...
7
votes
2answers
196 views

Remove WordPress theme from a specific page

There is a site with WordPress installed and a theme selected. I have created an HTML page for the site, but it wasn't looking well with the theme. So, I want to put the page on the site without any ...
1
vote
1answer
178 views

Use same page template for parent and child pages in a theme

I am working on a template which one uses on both parent and child pages. Suppose I have a: template name: TEST I need to use that template on both parent and child pages: Parent page name -> ...
0
votes
1answer
153 views

Does WordPress automatically redirect url without parent slug?

I inherited admin duties for my organization's site. Ive noticed that if I enter a url with a child slug only (and drop the parent) it seems to redirect to the full url. Ex: www.example.com/child-...
0
votes
0answers
60 views

Child Pages based on content within the post?

I am wondering how I can create a child page for each individual download link I have displayed within my WordPress the_content segment. Currently the inside of my WordPress content looks like this. &...
0
votes
1answer
302 views

Query to get child pages of current page and display it in action hook

First I want to apologize if there are spelling mistakes in this question. I'm using Genesis Framework. According to the following answer: https://wordpress.stackexchange.com/a/60295/146574 I'm ...
1
vote
0answers
84 views

Advanced Custom Fields dynamic update_field

I have a function that is triggered when a new review is submitted on a specific page. function rex_my_action ($review, $post_id) { $some_value = get_post_meta( 753, 'rwp_user_score', true ); ...
0
votes
0answers
42 views

Set page template and parent page automatically based on user login

I searched half the internet to find if the following is possible but unfortunately I can not find anything. I have the following hierarchy of pages: Main page Provider page 1 Provider package ...
0
votes
0answers
42 views

Getting child pages based on their actual menu order?

I'm able to get the child pages of a parent page with the following query: $args = array( 'post_parent' => $post->ID, 'post_type' => 'page', 'orderby' => 'menu_order', '...
1
vote
0answers
22 views

Share parent path between Custom Post Types and Pages?

Here's my situation: I have a custom post type I created called "professions" with three professions ("military", "firefighters", "law-enforcement"). I created a page single-professions.php to use ...
0
votes
2answers
369 views

Display a list of sub-pages of Custom Post Type Parent Page

I am trying to display the sub-pages of a custom page on the parent page. I found an abbreviated code that works very well for standard WordPress post_type "pages", but does not work for custom ...
0
votes
0answers
7 views

Child pages as a sub-section

I try to set a page template that shows all my children pages as a sub-section of parent page, but nothing working fine. Anyone can help me or have an idea to do this? I'm working with understrap
0
votes
2answers
33 views

Modify available templates (in dropdown)

I'm developing a WordPress theme with several templates. One template is called "Tabs". If a page with this template assigned has children pages, parts of their contents are shown in tabs on the ...
0
votes
1answer
28 views

How to disable alphabetical sorting page

I'm using the following code to display child pages on their parent page and all child pages are sorting alphabetically.how i can turn it off or change sorting by creation date? <?php global ...
1
vote
1answer
112 views

Child page excerpt

I have a parent page with some child pages inside. What I'm looking to do is display every child page excerpt and some other information inside its own cell on the parent page. Does anyone know how ...
0
votes
0answers
87 views

4-layered parent-child relationship between differents custom post types in hierarchical order in a Wordpress-Plugin

I have a very similar situation than what's described here: How to set parent-child relationship between differents custom post types The problem though is that I have 4 different custom-post-types ...
0
votes
1answer
26 views

I have a problem with displaying children pages of custom post type

All I need is to get a number of children pages of a custom post type This is my query: $args = array( 'post_parent' => $post->ID, 'post_type' => 'all_products', 'orderby' => '...
0
votes
0answers
22 views

Structure for calling child pages

In my project, I want the parent page to display 3 child pages in its menu. Every child page will be different from product to product. For example Product 1(Parent) -Product 1 -Overview -...
0
votes
1answer
139 views

get_the_title() gets printed out twice

I made a script which checks if the currently viewed page has a parent page and if it does, it prints both the parent title and child title. But if there is no parent page I still get a title of the ...
1
vote
0answers
130 views

How to retrieve parent menu item name of current submenu item

I have a menu item Services which has 5 submenus. Now when I click on one of those submenus, like Flexible Endoscopes I manage to echo the title of child item or current page title. But I can't find ...
0
votes
1answer
224 views

Sort order of next/prev sibling page

I have a page with a couple of children pages. On the parent page I want all children page listed alphabetically by title, but I want the sorting to ignore articles like "The" or "A". I achieved this ...
4
votes
1answer
157 views

Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]

My site has several static pages and several custom post types. I'm trying to create a custom user role called students and give students access to ONLY certain custom post types and certain specific ...
0
votes
1answer
210 views

Get WordPress Child Page IDs

I'd like to shorten this code and instead of manually placing all children Id's, I'd like to pull out only the id's and set it to array. this could be something dynamic in the future when they are ...
0
votes
1answer
244 views

Child pages and sub-pages do not appear. Why?

I have created a child page. However, when I access "http://example.com/Page/ChildPage" does not appear? Page (filename = page.php -> content-page.php) [WORK] Child Page (filename = page.php -> ...
0
votes
1answer
198 views

Add link to parent page in list of child pages

I try to add link to parent page to a working list of childpages. The parent page must be the first item's list whenever the list appear. Here is the actual code found here : //* List child pages [...
0
votes
1answer
2k views

Get Child Page IDs by Parent ID

I am currently trying to grab a child page id from a custom post type, but my values returned are always null. I know that the particular ID I'm passing has a parent so there should be a match. What ...
0
votes
2answers
741 views

is_child() function

My need is to check if a page is subpage of a page (with ID). I try to get this code working but it doesn't. function is_child($pageID) { global $post; echo $post->post_parent; // display the ...
0
votes
1answer
56 views

Get top Page IDs from menu and cycle through their child pages on a scroller

I have a slick slider scroller on my home page that cycles through some of the pages I have on my main menu. I am using the following code to do this: <div class="page-scroller" > <div ...