Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [child-pages]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

Website parent child relationship

My client has a well established Wordpress website which is currently set out as below: website/properties/property-development-name/unit We have been advised for SEO purposes that rather than the ...
Paul B's user avatar
  • 11
0 votes
0 answers
14 views

How to create archive child pages with good Yoast SEO meta?

I want to create children pages to some archives on wordpress with Yoast SEO. Today, i have /tags/{tagName} and i want to add sub pages to this archive. The goal is to have: /tags/{tagName} main tag ...
Vexyos's user avatar
  • 1
0 votes
2 answers
38 views

Subpage for Custom Post Type

I have a custom post type "location". add_action("init", "register_custom_post_types"); function register_custom_post_types() { register_post_type("location&...
Luca's user avatar
  • 3
0 votes
0 answers
25 views

How to pull through page title depending on which radio button is selected on the specific page?

I'm pretty new to Wordpress, ACF and PHP. I am currently working on a project, the website has 11 different sports centres all with different sport/activities, on each centre they will have a sidebar ...
jonnyplat's user avatar
0 votes
0 answers
16 views

Need help with child pages displaying as individual pages

We could really use some help, guidance, or any available resources related to our issue. On our WordPress website (using the free version of Elementor, Sinatra theme), we have encountered an problem ...
sp2322's user avatar
  • 1
0 votes
0 answers
23 views

I have a website issue I am trying to resolve

My website is jthomascrowne.com titled "The View From Here". I am currently using the Twenty Seventeen Theme on a Wordpress Business plan. I am relatively new to this. I know nothing about ...
j thomas crowne's user avatar
1 vote
2 answers
435 views

$pages = get_pages('child_of='.$post->ID); Why arguments are concatenated?

I am reading a book called "Learn to Create WordPress Themes by Building 5 Projects" . In that to retrieve the parent for pages, they have a function to get the parent of the pages. The ...
Venkatesan's user avatar
0 votes
0 answers
103 views

Custom child page permalink

I'm trying to customize the permalink of some child pages. I have this structure: example.com/story/story-name-slug/chapter-slug/page-slug And I'm trying to transforming that structure into this: ...
gb_factory's user avatar
1 vote
1 answer
71 views

Append a code when at the current page in wp_list_pages()

I'm using wp_list_pages() to show pages and subpages in a tree view and I need to add a "read more" as a sub-item right after the current page. Example: We are at the "Page tree" ...
Diana's user avatar
  • 1,238
0 votes
1 answer
150 views

complex get_posts() query to select child pages

I have pages on 2 levels under the main deparments page like below. Departments --Department 1 -----Course 1 -----Course 2 --Department 1 -----Course 3 -----Course 4 --Department 3 --Department ...
LeeTee's user avatar
  • 31
1 vote
1 answer
465 views

How to add numeric slug for child page in WordPress 5.9?

I am trying to configure WordPress 5.9 to allow numeric slugs for child pages. Drawing from the 2015 answer to a similar question I took the up-to-date code of wp_unique_post_slug, removed || ...
Quasimodo's user avatar
2 votes
0 answers
82 views

Child post with numeric only slug keeps redirecting to parent

I modified the allow-numeric-stubs plugin code to work with CPTs. You can view my forked repository here: https://github.com/akshatkedia/allow-numeric-stubs WordPress is now allowing numeric slugs for ...
Akshat Kedia's user avatar
1 vote
1 answer
190 views

Wordpress get the child pages of current page

I want to display the child pages of the current page you are on. <?php wp_list_pages('child_of=67&sort_column=menu_order&title_li=') ?> If I give the id number like above it works ...
Simó Tamás's user avatar
1 vote
2 answers
629 views

Pagination of a WP_Query Loop in a child-page page template

See edit at bottom. I have a wp_query loop in a page template for a custom post type ("success_stories"). The loop itself works fine but I cannot seem to get pagination working. I've tried ...
Josh M's user avatar
  • 342
1 vote
1 answer
58 views

load common thank you template with different content for different pages

i have created a template called thank-you.php and inside that i want to show different content as per the parent url. for e.g. mywebsite.com/page/thank-you and mywebsite.com/another-page/thank-you. ...
Zuber's user avatar
  • 111
0 votes
1 answer
45 views

How to highlight 1st level menu item based on actual page

I am trying to highlight 1st level menu item by adding 'current-menu-item' class using nav_menu_css_class filter based on actual page / article / post / etc. For example, menu looks like this: ...
Bartosz Brożek's user avatar
1 vote
1 answer
76 views

List child pages of current page but limit to specific year

I have an old site that has sooo many child pages that I'd like to limit the return of child pages on a current page to just a specific year so that I can pull each year into an accordion. I am ...
Andrea's user avatar
  • 23
1 vote
1 answer
471 views

wp_insert_post if page doesn't exist under current page

I am trying to dynamically insert a page/multiple pages as a child under the current page in my template file, using wp_insert_post, however I need to first check if the page title already exists ...
Daryl Roberts's user avatar
0 votes
1 answer
774 views

Check if parent page has child page of certain slug

I currently have a function that checks to see if the page is a parent, and if so, do stuff. But I also want to check to see if the parent has a child page that has a certain slug. Basically, how ...
Garconis's user avatar
  • 144
0 votes
1 answer
165 views

Show child by slug, while knowing parent ID

Im trying this to show My CurrentPage (Licenciatura en Ciencias del Arte y Gestión Cultural.) child called "Infraestructura" by it's slug. I don't know whats wrong with my code. It Returns ...
May Ornelas's user avatar
1 vote
0 answers
28 views

Verify if the current page has at least one published child

In my theme php page template, I need to echo a string only if the page has at least one published child page. Actually, I have a function that verifies if the current page has any children, ...
Myriade's user avatar
  • 11
0 votes
1 answer
1k views

Page access only from a specific page in wordpress website

I would like to know if it possible to have a page that open if and only if the visitor comes from a specific page (which in my case would be the homepage). So for example, the visitors land on the ...
Peter's user avatar
  • 1
0 votes
1 answer
1k views

Get first level children of a page ID

I am looking to get immediate children of a page ID. I tried below code, but it does not seem to work $pageIDchild = get_pages( array ( 'parent' => 0, 'child_of' =>$pageID, ...
Rohit's user avatar
  • 3
1 vote
1 answer
798 views

Next and Previous Posts of Same Parent

I'm working on a website for a webcomic and I have a custom post type set up for comic pages. I have multiple series on the site and have made each comic page a child post of a parent (one parent for ...
ZackAkai's user avatar
0 votes
1 answer
2k views

Child Theme not overwriting Parent theme php file

I'm new to Wordpress and how Child themes work. My child theme I am trying to overwrite two files in sub-directories. I've copied the parent files and edited them in child theme but changes are not ...
Alton Caber's user avatar
0 votes
1 answer
37 views

How do I find out which (page) template file my custom child post is looking for?

I am trying to make something like a web-app with WP. One of the issues I'm facing now is that I cannot find out which page template file my post is looking for. I have looked at template file ...
bramdek's user avatar
0 votes
1 answer
718 views

How to get an array of pages ID by some page's slug and all its children pages in get_posts() function?

I have a custom function in my theme that creates a dynamic sitemap.xml file. For that I'm using $myVar = get_posts( array(...) ). In that array I need to exclude some pages. I want to exclude some ...
Victor's user avatar
  • 25
2 votes
2 answers
2k views

select a private page as parent for another private page

I am trying to build a customer portal however the private page is not showing in the parent drop-down (The drop-down at the right bottom of page settings under page attributes). Both the parent and ...
Arushi Rajput's user avatar
4 votes
3 answers
2k views

Some pages are missing from the Parent Page select in the Editor

Two of my top-level Pages, and all of their children, are missing from the dropdown menu in the Block Editor for selecting a Parent Page. There are no special characters in the titles or permalinks. ...
WebElaine's user avatar
  • 9,430
0 votes
1 answer
83 views

Return true if parent page id matches

I'm trying to write a function (with little luck) that does a simple check against the top level parent page and returns true if the ID matches a supplied ID number. For example; If I'm on page ...
benhen31's user avatar
0 votes
1 answer
119 views

Only one parent page showing

I'm working with the Incubator theme. I have created two other parent pages but they come up blank, with no content. The only way they show content is if I set them, one at a time, as the homepage in ...
MauF's user avatar
  • 211
1 vote
1 answer
690 views

Need wp_query to return all children and grandchildren

I am working on a site with three different main 'topevel' sections, that act as the top level parents of the site. Each toplevel section has children and grandchildren, and there needs to be a ...
Benlov's user avatar
  • 21
0 votes
1 answer
239 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, ...
Rugo's user avatar
  • 103
0 votes
1 answer
111 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 ...
tejt's user avatar
  • 1
0 votes
0 answers
57 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 ...
kitmin's user avatar
  • 3
0 votes
1 answer
505 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 ...
mat's user avatar
  • 1
1 vote
1 answer
822 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 ...
Anna's user avatar
  • 13
0 votes
1 answer
541 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 $...
Jen Brigham's user avatar
2 votes
2 answers
450 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/...
Andy's user avatar
  • 21
1 vote
1 answer
304 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 ...
Jalapeno Jack's user avatar
1 vote
1 answer
2k 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 ...
Jalapeno Jack's user avatar
0 votes
0 answers
43 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 ...
John Dawson's user avatar
0 votes
3 answers
571 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() $...
Aneesh Barthakur's user avatar
0 votes
1 answer
44 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 ...
W4yp01nt's user avatar
2 votes
1 answer
616 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( '...
baalstorm's user avatar
0 votes
1 answer
512 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 ...
reigns1989's user avatar
0 votes
1 answer
446 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(...
Peter's user avatar
  • 1
1 vote
0 answers
30 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: ----- ...
nguyenvu's user avatar
0 votes
1 answer
97 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 ...
JarsOfJam-Scheduler's user avatar
0 votes
0 answers
42 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 ...
Geoffrey's user avatar
  • 105

1
2 3 4 5 6