Questions tagged [child-pages]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

Return value of get_permalink(0) and get_the_title(0)

I'm new to wordpress and I'm following a tutorial right now but I don't understand wordpresses behaviour. I'm trying to change the title of a sidebar which lists the parentpage and it's childpages, ...
0
votes
1answer
31 views

Hide BBPress create topic on one page

Hi sorry this is really basic question. I was just starting to explore wordpress and bbpress, I have a page with the forum index using the shortcode, when I enter a forum it has all the topics and the ...
0
votes
0answers
42 views

How to use POST method using custom wordpress button?

everyone! I'm pretty new to wordpress development, and right now i'm trying develop a small ecommerce site using some wordpress plugins and some php on my part. Right now i'm in the middle of ...
0
votes
1answer
24 views

How to get child pages and add unique class only to active page?

I have a parent page with child pages. How to get child pages and add unique class only to active page ? I am making a sidebar with children's menu parent page one level up. I can list all child ...
1
vote
1answer
40 views

Allow users to publish child pages of the pages they have access to edit

I have created a custom role called Custom Author. Users in this role can edit their own pages and add new pages. I would like to restrict new page creation and allow Custom Authors to create pages ...
0
votes
1answer
35 views

How to Display Shortcode in the correct location, currently displaying before content after Page Title?

I am having an issue displaying the shortcode in the correct location when using a display child pages query. Can someone fix this for me? Thank you! function show_product_pages() { global $...
0
votes
0answers
16 views

Set custom post type posts as children of all pages

I'm sure this is possible, but I can't seem to get my head around the best way of setting this up. We are building a website that gives each of our clients a video library page. The videos are stored ...
0
votes
0answers
21 views

Breaking a post into multiple subpages, each with a custom slug

I'm trying to break a single page into multiple subpages. Started out using <!--newpage--> html comments, but then decided to switch to a customized version of the multipage plugin. The basic ...
0
votes
0answers
11 views

get_pages to show structured child pages and sub-pages of child pages

I am building a section in WordPress website where I can show child pages of the current page and when user hover on child page link then it displays subpage content ( Title, Excerpt, Thumbnail). I ...
1
vote
1answer
51 views

Remove custom post type slug not working for child pages

I'd like my custom post type, products, to not use a slug, eg: domain.com/product-name. The code below sorts that out nicely, however it fails to work with child pages, eg: domain.com/product-name/...
0
votes
0answers
12 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
24 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
56 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
24 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
45 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
107 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
23 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
20 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
19 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
22 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
125 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
14 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
46 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
29 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
41 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
352 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 ...
1
vote
1answer
27 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 ...
2
votes
2answers
131 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
35 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
198 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
233 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
238 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
1answer
429 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
114 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 ); ...
1
vote
0answers
25 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
471 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
2answers
48 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
36 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
171 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
1answer
27 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
23 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
165 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
182 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 ...
1
vote
1answer
235 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
278 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
284 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
313 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 -> ...