Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
12 views

wp-types - showing custom field on parent [on hold]

I am wondering why this piece of code: <?php $cena_produktu = types_render_field("cena", array("raw"=>"true")); echo $cena_produktu; ?> is not working on a page as parent? well.. it's ...
0
votes
0answers
13 views

Duplicate content problem with parent slug

I have one page without a parent page attribute called "bar", with slug "bar": /bar/ I have child pages, for example "foo", which has the "bar" page as parent attribute and slug is "foo": ...
0
votes
1answer
19 views

List of pages - AJAX load more

I apologise if this is an extraordinarily broad question, but I am getting a little lost. I am using the below to show child pages (note: I am using Advanced Custom Fields) <?php /** * ...
0
votes
1answer
44 views

404 on child page when parent page slug is identical to custom post type

The internet is swamped with this issue but all the results were from 2010-2011 so I wanted to check if there was any advancement in the matter. I have the following scenario: Created a custom post ...
0
votes
0answers
18 views

Displaying Custom Post Type on Page with Same Title

I'm building a sports blog. I have a custom post type called conference. Each conference post contains HTML that is displays the team logos horizontally on my team custom posts as shown in the ...
0
votes
1answer
25 views

Redirect page to default subpage

On a site that I'm working on I have a particular page that has four subpages, which act like process steps. I want the parent page to always redirect to the first of these as a default, should the ...
0
votes
1answer
70 views

wp-query, pull children of parent page

So here's what I'm trying to do: I'm trying to develop a theme that shows any sub-pages on the parent page. I've gotten this running successfully with a WP_query and a simple loop: <!--show sub ...
0
votes
1answer
43 views

Can a user find a child page?

When editing a page, instead of the expected content, all the user sees is this: [child-pages depth="1" sort_column="post_title"] How can the user find that page in order to edit it?
0
votes
1answer
8 views

Link to most recent child page

in the header of a website I am trying to link to the most recent child page of a particular parent page. I can't seem to wrap my head around how to accomplish this. Does anyone have any input on ...
0
votes
1answer
27 views

Page that links to category content

I have a page called: fruit...then I have three child pages called cherry, lemon, and peach. I also have a category called fruit, and three child categories called cherry, lemon, and peach. What I am ...
1
vote
1answer
33 views

Installing plugins and using complex folder structure with child theme in WordPress

I'm creating a new WP website based on a template, and I've created the child theme for this template. It is working without any problem. I understand the basics for a child theme as adding my ...
0
votes
1answer
19 views

Is there a way to dump all registered sidebar/widget?

I need to know the properties of sidebar and widgets I've added, is there a way to dump those? Thanks.
0
votes
0answers
62 views

How to slidedown and slideup child pages clicking on parent pages in jquery or javascript?

I have created a sidebar in wordpress in which all parent pages with subpages are listed. I have used following code in sidebar-left.php file and call this in template file. <div id="primary" ...
0
votes
1answer
26 views

Display Tags of Child Pages

I'm trying to display tags of child pages on the parent page. In my functions.php: // add tag support to pages function tags_support_all() { register_taxonomy_for_object_type('post_tag', 'page'); } ...
0
votes
1answer
17 views

Firing page_publish where page is child page

I'm having difficulty getting a function to fire when publishing a new page. I'd like it to fire when a new page is being published or edited but ONLY when that page has a parent. Here's what I've ...
0
votes
0answers
12 views

Autogenerateing associated page on parent custom post type publishing

Goal: Automatically generate a child page whenever a custom post type ive created is published. Creation (and publication) of the main post type is done using a frontend form using the ...
0
votes
1answer
400 views

How to display list of child pages of parent page in wordpress?

I have following format of menu. Treatment -Beauty --Services --Products -Surgery -washing I have followed follwed following link: How to Display a List of Child Pages For a Parent Page in ...
0
votes
2answers
319 views

Custom post type child page 404

This issue seems to be quite common, but the solutions that worked for others haven't worked for me. I'm using the CPT UI plugin and have created a CPT called 'courses' with the following settings: ...
0
votes
3answers
46 views

Deleted pages showing up when querying for child pages

I'm using the following code to display the featured image, post_title and custom field data from relevant child pages. <? $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ...
0
votes
0answers
27 views

Theme-Option-Panel: Select List of Pages, Childpages and Posts

I just can't solve this problem: in the wp dashboard I want the user to have the option of selecting between all pages, sub-pages and posts (also custom-post-types) for displaying them in special ...
0
votes
0answers
44 views

How to configure a child-post of a parent-post to have hierarchical sub-posts?

Question: What plugin or coding configuration needs to be implemented to create this child-post to parent-post hierarchical, many-to-many post relationship? Goal: To be able to create sub-posts of a ...
0
votes
1answer
46 views

How to finish this loop?

I had already asked a question of how to get only get the child pages of a parent page that belonged to a certain taxonomy. A very helpful user gave me the answer to this, however, I was not provided ...
1
vote
0answers
27 views

Weird behaviour on Edit Menus screen

I am running WP 3.9.1. Fresh install. ACF and Gravity Forms are the only two plugins running. Perhaps someone had this issue before... On the edit menu screen I have a tab called "View All" where I ...
0
votes
1answer
42 views

Can I make Wordpress use a custom template for a child page

I have a custom post type called communities. Then I have the appropriate single-community.php page. Works great! So we want to use some of these "communities" as parent pages. Then underneath them ...
1
vote
3answers
110 views

Multiple Conditions for Child Page Title

I've been trying to work with Conditional Tags and cannot wrap my head around this problem. PHP novice here. On sub-pages I need to display the parent page title as well as the page title. I have it ...
0
votes
1answer
57 views

How to list a page tree?

I have this structure for example: Page 1 Sub-Page 1.1 Sub-Page 1.1.1 Sub-Page 1.1.2 Sub-Page 1.1.3 Sub-Page 1.2 Sub-Page 1.2.1 Sub-Page 1.2.2 Sub-Page 1.2.3 Page 2 ...
1
vote
1answer
80 views

Injecting a custom sql query into a page/theme

I have written a custom sql query for our WordPress website (fairly elaborate and not achievable with the standard wordpress code) and I've got it to run via $pageposts = $wpdb->get_results($query, ...
0
votes
1answer
134 views

Adding title and description to subpage's featured image

Hej! I have a subpage to display it's subpage featured image. I would like to add the title and description to beneath the thumbnail. Today my code look like this > In the functions.php function ...
0
votes
1answer
125 views

Display thumbnail of child, parent and ancestor using featured thumbnails

I have tried to achieve that the Home page displays featured images of all it's child pages and in turn some child pages are displaying the featured images of their child pages. This is my code so ...
-2
votes
1answer
20 views

How to Hard Set the Parent Page in Template

This template displays child pages of the parent page that calls it. I need to modify it to hard code the parent page to a specific parent, using the slug or other means. Once I know how to do that ...
1
vote
2answers
2k views

Using pagination with get_posts on page type

Is there a way to use pagination on a page query like with posts? Here is the code I'm using: $listingPages = get_posts( array( 'cild_of' => '7', 'meta_key' => 'Type', ...
1
vote
2answers
51 views

Listing subpages title and content and styling the first iteration differently

So for now, every iteration looks the same and it's been a while since I dealt with php so could you help me? <?php $pages = ...
0
votes
1answer
58 views

Show list of Child Post in Parent Post

I have created custom post type. I have posted a parent post and it has a few child posts as well. On the Parent post, I want to show its children posts. How can I achieve it?
0
votes
0answers
351 views

Custom Post Type Child Pages

I'm getting a 404 page when viewing child-pages of a custom post type. Right now I have a pages (let's call it 'Books') that displays every 'book', and in the menu have other pages listed under Books ...
0
votes
0answers
25 views

Change the Featured image for child posts

I have created two post type for my website ("product" and "variation"). Each variation has a feature image and their post parent is a "product" post. I would like to be able to change the different ...
0
votes
0answers
68 views

Subfolder index.php 404 Errors

I'm looking for help troubleshooting why subfolder pages return a 404 error if "index.php" is appended after the subfolder. I do not experience this behavior on other WordPress sites. I have inherited ...
0
votes
0answers
94 views

How can I give Wordpress child custom post type the same title and slug as its parent?

I have two custom post types, one is the child of the other (the parent is more of a modal post). I want the child post to inherit the same title and slug as its parent. I've tried to use the ...
0
votes
2answers
251 views

Load child template based on parent

I have child page templates that need to be automatically applied based on the parent template. I'm wondering if there is anyway Wordpress handles this. This is the solution I came up with. (in ...
2
votes
0answers
383 views

Create child page within custom post type

I want to be able to have a link like this, site.com/my-custom-type-slug/single-custom-post-name/stats/, where /stats should contain the /my-custom-type-slug page content and when I add content to the ...
0
votes
1answer
36 views

How to check if the current page's parent is one of 2 different ID's

I'm using this little snippet right now to check if the current page is the child of a particular page; $studies_parent = 5860; if ($studies_parent == $post->post_parent) { Which is working ...
1
vote
0answers
12 views

query pages by a childs publish date

I am currently working on a wordpress project and would like to know if its possible to query pages by a childs publish date? I currently only want to show the parent page so my arguments look like ...
0
votes
1answer
107 views

Get post_meta of children and compare to current page ID

I am stumped on a bit of php code in my template. I have a custom field named "services" with a value such as "2402, 2366, 78" These are page ID's. In my template I want to do the following: Get any ...
0
votes
1answer
220 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
88 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
190 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
0answers
55 views

Wordpress Programmatically create subpages when a certain page template is used

I've been fiddling for quite some time now but can't seem to figure this out. What I am looking for is this: One creates a page and set it to use a certain page template, say: "Shop Owner" WP ...
0
votes
1answer
135 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 ...
0
votes
0answers
15 views

Hereditary Subpages Nav

I'm trying to create an automatically generated navigation using Wordpress child pages - which will only show the next child pages down from the selected one (example page). You'll see that I can get ...
3
votes
1answer
665 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
641 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 ...