The tag has no wiki summary.

learn more… | top users | synonyms

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 ...
0
votes
1answer
243 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
418 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
323 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 ...
1
vote
1answer
1k 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
751 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
410 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
11k 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
309 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
169 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 ...
2
votes
3answers
147 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
81 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
2answers
2k 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
3k 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
6answers
3k 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
2answers
780 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
51 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
588 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
350 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
64 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 ...
0
votes
2answers
476 views

Conditional sidebar menu

I've created a menu for each section of the site, and I'd like the sidebar to only show the relevant menu to pages in a section, so the 'About' page and its children receive the about menu and the ...
1
vote
1answer
2k views

Menu with parents, children and or siblings pages display

Here you see the parent menu selected in the horizontal navbar. I already have that working. I need a sidebar like they have with the same parent indicated plus children when they exist . At the ...
0
votes
1answer
244 views

Load parent pages when there are no child pages

I use the following code to load subpages in a sidebar on all pages: <?php $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0&depth=1'); ...
1
vote
1answer
4k views

Breadcrumbs showing Parent and Child Pages

We are trying to create a function for breadcrumbs that will show not only the path to the current page, but also to other pages with the same parent page. For instance, on ...
0
votes
1answer
64 views

Query sub subpages based on specific date?

I have an Events section as follows: ⤍ Page 1) ∟ Subpages 2) ∟ Sub subpages 1) Own template, w/o sidebars, but query_posts() and get_title/excerpt() from N°2 2) Other subpages are ...
0
votes
1answer
475 views

Get Child Custom Post Content on Single.php?

I have a custom post type, with children 2 rows deep... Outfit 1 Inner Child 1 Child 1 Child 1 Child 1 Outfit 2 Inner Child 1 Child 1 Child 1 ...
1
vote
2answers
374 views

Linking to Child Theme PHP Files

I have an existing website with html, css, js, and image files that I am trying to convert over to wordpress. I installed a clean local install using mamp on my hard drive and created a new child ...
0
votes
2answers
244 views

query if page has not child

I'm trying to create a page which display a few of sub pages (child pages), however if the page has not child I would like to display a message. I cannot get a query that allow me to do something ...
0
votes
2answers
910 views

Display posts of custom type in hierarchical order

I has custom field 'People' and I have parent pages(post types) and child pages (post types). This is my code: <?php $args = array( 'post_type'=> 'people', 'posts_per_page' => -1, ); ...
0
votes
1answer
405 views

If/Else child list for Custom Post Type single template within loop?

I'm trying to add a feature to my 'Services' custom post type single template that displays one thing if the post type has one or more child post types and another thing if it doesn't. So far I've ...
1
vote
1answer
594 views

How to hide all child pages with post_query?

i have a page template as start page(home.php). i use a 2 columns grid to display all pages on that home.php with title and excerpt. unfortunately also my child pages are shown and i can't figure out ...
0
votes
1answer
395 views

Limit the number of child page displaying

I created a code for querying child pages when we're on a parent page and also display brother pages if we are on a child page, and works amazing... now my problem is, I cannot find a parameter like ...
2
votes
2answers
677 views

Custom post type hierarchical permalinks not behaving as expected for parent/child pages

When you have Pages with children, the permalink structure works something like this: example.com/parent-page/child-page/ All well and good. Trying to go to this URL: example.com/child-page/ ...
0
votes
1answer
510 views

Check if page has subpages

I'm try to build a menu with wp_list_pages() that must work like this: Main Page -Subpage1 -Subpage2 I check if the Page has_subpage and i can see the 2 subpages when i'm in the Parent ...
3
votes
2answers
1k views

How can I programmatically create “child” pages on theme activation?

I know how to create pages automatically when a theme is activated, but I need help to figure out how to also programmatically create child pages at the same time. For example: - Page 1 - Page 1.1 ...
1
vote
2answers
136 views

Trouble with parent and child conditional tag to show content

I am trying to conditionally change a link based on what page a user is on, but I am having trouble finding the correct code to perform the action. Here is what I want to do (In English to explain ...
0
votes
2answers
183 views

i want to get the parent id, only on parent -> child -> child page

here is Hierarchy Parent (id=34) Child Child of child-1 Child of child-2 Child of child-3 Child of child-4 I am at child of child, i Just want to show sibblings of child of child ...
1
vote
1answer
227 views

Create Wordpress child page from page actions

I am trying to add an option to create a child page from the wordpress all pages screen. I found this link, but cannot get it working properly. It is exactly what I need, but I need help fixing it ...
0
votes
2answers
2k views

Exclude child pages args array

I have the following code and need it to exclude the child pages of a page ID; <?php $args = array( 'post_type' => 'page', 'post_status' => ...
0
votes
2answers
484 views

Active Menu Highlighter with Subpages?

my question is... I have 2 pages & 2 subpages in each page. like: page1 -->subpage1 -->subpage2 page2 -->subpage1 -->subpage2 & my Menu is Page1 page2 Now if i select ...
0
votes
4answers
4k views

Display child pages in sidebar of parent page in wordpress

How to get displayed child pages on parent page and also on child page of that parent in sidebar?Trying to paste code from wp codex page and from several other sites, but with no success.I always get ...
1
vote
1answer
1k views

how to properly list child pages in sidebar?

My pages menu is maximum 3 levels deep and I am having a hard time figuring out how to properly list the child pages in the sidebar. If a page is a parent I want to list it's direct child pages and ...