The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
252 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 ...
0
votes
1answer
96 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
222 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
1answer
144 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 ...
3
votes
1answer
764 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 ...
1
vote
2answers
727 views

List child pages of a specific page

I'm looking for a snippit/function that will list the child pages of a specific page (I guess by page ID) but not necessarily when you are on that page or a child of that page. The parent page ...
0
votes
2answers
2k 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 ...
1
vote
1answer
754 views

get_pages - Display child then grandchild pages

I have a page structure like this. Portfolio - Residential - - Resident 1 - - Resident 2 - - Resident 3 - Commercial - - Commercial 1 - - Commercial 2 - - ...
0
votes
2answers
75 views

List subpages in order

This may be a very basic question, but I'm a beginner. How can I list my subpages in alphabetical order? I have 14 subpages total. This is what I was told to use but my page is a mess. [subpages ...
0
votes
0answers
199 views

displaying child pages in columns when on a parent page

I would like to display sub pages in columns. Some parent pages have a lot of sub pages and the scroll is very long. I am currently using the below code to display sub pages. ...
-1
votes
1answer
165 views

Subpages menu on sidebar plus widgets

I'm a newbie, using WP 3.6. On a custom theme I've put a subpages menu on a sidebar using "wp_list_pages". On the same sidebar under the subpages menu I'm trying to add some WP built-in widgets ...
2
votes
3answers
1k views

Advanced Custom Fields - Get custom fields from parent page

I'm using Advanced Custom Fields making it easier for my client to manage his content. On all of my child- and parent pages i would like to have the same header image and sidebar information. ...
1
vote
2answers
789 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 ...
1
vote
0answers
147 views

Query Pages and post excerpts dynamically

I have a custom home page, a blog page which includes a dynamic preview area of the latest 5 blogs, and some other miscellaneous pages. Im trying to design an "events" page where the main page has a ...
1
vote
0answers
67 views

Removing Parent Page URL While Keeping the Navigation Intact

So here is the current format: site.com/parent-page/child-page/ - example 0 Child-page is ranking higher than parent-page, which is not what I want. So, I have a solution. site.com/parent-page/ - ...
0
votes
1answer
94 views

Get current post's child page?

Is it possible to find out what page a post is contained in? Im in my single.php template and im listing child pages in a sidebar using wp_list_pages, I want the page (not category) that the post is ...
0
votes
0answers
43 views

Detecting top parent category fails on home page

I have the following method to detect a top level category. But it fails on home page returning alway true. //detect parent category function in_parent_category($cats,$_post=null){ foreach ...
0
votes
1answer
76 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: ...
0
votes
2answers
805 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 ...
-2
votes
1answer
113 views

How can I structure my pseudo footer nav code with wordpress codex code?

I'm building my first fully custom wordpress theme, and I'm starting to pull hairs out while trying to write the dynamic footer code! I've tried a bunch of codex this and codex that but can't seem to ...
1
vote
2answers
1k views

Get Permalink for the top level parent of child pages

I've this pages structure: TOP PAGE SUB PAGE 1 SUB SUB PAGE 1 SUB PAGE 2 [etc] Is it possible to display on each sub page a link to come back to the top level page? And how?
0
votes
0answers
75 views

Child Pages on Mobile/Touch Screen not clickable

I have child pages under parent pages in page menu/header, they work fine when using a PC, but I cannot get them to work when using a mobile phone or touchscreen device such as an iPad. I am using ...
0
votes
1answer
62 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
983 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 ...
5
votes
1answer
628 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
1k 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 ...
2
votes
1answer
876 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
41 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
85 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
122 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
337 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 ...
2
votes
1answer
452 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
192 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
79 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
258 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
197 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 = ...
5
votes
2answers
307 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
59 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
242 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
2k 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
678 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
199 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
267 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
147 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 ...
2
votes
1answer
377 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 ...
3
votes
1answer
1k 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' ...
2
votes
2answers
139 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
176 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
637 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
94 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 ...