The child-pages tag has no wiki summary.
-1
votes
0answers
18 views
i want to retrieve title,description and thumbnail of child pages within a parent page
<?php
$args = array(
'child_of' => 19, // current page
'depth' => 1, // get children only, not grandchildren
'echo' => 1, // print immediately when we call ...
0
votes
1answer
14 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 ...
-1
votes
1answer
47 views
Woocommerce - Making product pages child of shop
I'm new to WordPress and trying out woocommerce, but I've ran into a small problem.
Here is my site.
The products pages are no childs of the Shop page, so whenever I click on a product, the active ...
4
votes
1answer
108 views
Create a “Dummy” parent page for a hierarchy in page listing?
Is it possible to set up a "dummy" page - just a page title that appears in the page listing, and a page that is not editable and doesn't have a slug?
This is more of a hypothetical question, as I ...
0
votes
1answer
49 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
0answers
15 views
child pages are not ordering correctly? [duplicate]
I have a custom post type.
I want to display them in the menu order.
e.g In backend i have something like
Post 1
Post 2
Post 3
child 1
child 2
post 4
Post 5
...
1
vote
1answer
142 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 ...
1
vote
1answer
24 views
child of post type (custom)
I registered a custom post type (foo) with register_post_type, setting 'hierarchical' => true,so now when I want to use it I have post_type=foo.
How can I query child of foo? any ideas?
thanks!
0
votes
1answer
38 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 ...
1
vote
0answers
52 views
Parent/child pages and link structure the right way
I've always wondered what's the best way to achieve the following with pages.
Say I have a (part of a menu) that looks like this:
What we do
Design websites
Develop websites
SEO
The 'What we ...
0
votes
1answer
109 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
0answers
17 views
Delete child pages when deleting parent (Admin area) [duplicate]
I want to make the admin area delete all the child pages of a parent when the user deletes the parent, in essence ensuring that those child pages can never become root level pages. Can someone help?
...
1
vote
1answer
82 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 ...
0
votes
1answer
79 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
41 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
84 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
1answer
37 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 = ...
4
votes
2answers
209 views
Allow only new sub-pages to be created
Here is an amazing solution to restrict the creation of new parent pages, and I would want to use it, but the newly created sub-pages are saved only as drafts and this was not solved (see last ...
1
vote
1answer
39 views
Organizing Your Pages
I'm having problems creating sub pages. So far I've followed the proper directions:
Go to a new page, click the "Page Parent" drop-down menu.
Select the
appropriate parent Page from the drop-down ...
2
votes
1answer
99 views
List the 5 most recent child pages
I created a hierarchical custom post type for a gallery. The parent pages are the galleries and the child pages are the albums. I want to display the most recent albums on my sidebar (so basically the ...
0
votes
3answers
329 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 ...
1
vote
0answers
165 views
Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
I've never posted here, but I'm tired of slapping code together. That said, I would be most appreciative if someone could help me with this.
I need a page template that:
outputs the PARENT PAGEs, ...
0
votes
1answer
92 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
66 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
72 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 ...
1
vote
1answer
95 views
How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only
Is there a way to limit the creation of pages (custom post type) to a specific depth - e.g. level 1 (where 0 = parent, 1 = child, 2 = grand-child, etc.)?
For example, let's create a 'Summer' recipe ...
2
votes
1answer
396 views
Custom Post Type Permalink For Parent/Child, 404 Page Not Found Error
Here we have a snippet from a functions.php file...
add_action('init', 'create_recipes');
function create_recipes() {
$recipes_args = array(
...some properies...,
'hierarchical' ...
1
vote
2answers
83 views
Show child pages when on a child page
On my site I have a number of parent pages with associated child pages. How can I show all the child pages of one particular parent when a visitor is either on the parent page or one of it's children?
...
1
vote
1answer
95 views
List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?
I have the following function that lists all Child-Pages of a page.
function show_subpages() {
global $post;
$subpages = wp_list_pages( array(
'echo' =>0,
...
0
votes
1answer
148 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 ...
1
vote
1answer
56 views
Custom Field returning Numerical Value for Image rather than URL
I have been trying a way round my latest WordPress problem all morning and I feel now is the right time to shout and ask for help.
I have been trying to create a people directory, I'm there except ...
0
votes
1answer
106 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 ...
-1
votes
1answer
166 views
highlight parent page on menu when child page is on sidebar (and not on menu)
i'm using twenty-eleven, i have on the menu 4 items : Home, About us, Contact, Clients
it's a custom menu. The site currently is on localhost, so no preview is available. However i haven't put the ...
0
votes
1answer
170 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
1answer
365 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 ...
2
votes
1answer
430 views
query attachment images … if no attachments -> get attachments of parent page?
I use this to query all attachments of the current page or post I'm on …
$query_images_args = array(
'post_type' => 'attachment',
'post_mime_type' =>'image',
'post_status' => ...
0
votes
1answer
217 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 ...
1
vote
1answer
2k views
wp query to get child pages of current page
Can anyone please help me to with the wp_query.
I am making a template file/loop to create and archive page of the current page children pages.
This query needs to be automatic as I am using in on ...
1
vote
0answers
180 views
List Posts For Terms Of A Custom Taxonomy For Any Post Type
The function is great and i am using this function with these filter to just display selected taxonomy term posts by id, but what result i am getting is like this
Child Taxonomy 1
- Child Taxonomy 1 ...
2
votes
1answer
135 views
Only allow new subpages to be created
I'm looking for a way to only allow users to create new subpages once there are nine pages that are parents/root pages. Once there are nine parent pages when trying to create a new parent the users ...
1
vote
0answers
99 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
1answer
50 views
WordPress Template works until page becomes a child
Ok so this is really strange. I do not consider myself a WordPress expert, but I am also not a beginner either. I created a template that works just the way I need it. Basically it checks for the ...
2
votes
1answer
510 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:
...
1
vote
1answer
551 views
Is there a default template file for child pages / subpages?
This seems like a very simple question. I'm looking for something like sub-page.php or page-child.php where I can do some different things on the child pages of my theme.
They are different enough ...
1
vote
4answers
821 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
1answer
249 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
44 views
How to control display of page lists on sidebar that doesn't have childrens
I am using the following code to list the child pages of current page on my sidebar. It is working very well.
$titlenamer = get_the_title($post->post_parent);
$output = ...
1
vote
1answer
246 views
meta_key & meta_value not working with get_pages and custom taxonomy
I'm trying to use custom taxonomy with pages. Basically a page has a "relevance" taxonomy, depicting who the page is relevant for. The pages are created in a hierarchy based on the departmental ...
1
vote
1answer
148 views
What is the optimal way to filter out subpages from admin?
I guess it's always possible to hide them with js, but is there a code snippet out there for query level child page filter? I only want top level pages to remain.
EDIT: my coder came up with it, stay ...
1
vote
1answer
59 views
Display the contents of a custom field of a page on their child
Let's see if anyone knows how to accomplish the following:
I have a custom field, which is a textarea where the user can enter any text. The idea is that if a page is filled in that field, the entered ...