The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
649 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
530 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
312 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
62 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
436 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 ...
0
votes
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
231 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
455 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
348 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
224 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
757 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
399 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
538 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
359 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
656 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
447 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
942 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
134 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
170 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
224 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
1k 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
434 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
969 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 ...