The children tag has no wiki summary.
0
votes
1answer
12 views
List CPT by menu_order with children right after parent
I registered a custom post type drawer where my posts are ordered using menu_order. Each drawer could be a child of another drawer, on a multiple depth (parent > child > child of child > child of ...
0
votes
1answer
54 views
Better wordpress attachment query then this
I have a site with more then 10.000 posts and images, its classipress site. I need somehow to show all images from posts that are on pending status, and who havent expired(post meta). This is the code ...
0
votes
0answers
14 views
add the new parent category for the already existing category
How to add the new parent category for the already existing category. For eg, Post1 has a category cat1 if i want to add the Post1 under parentcat1 with the child category of cat1. the post should be ...
0
votes
1answer
42 views
how to display all images from their siblings/ from same parent?
I need to know how to display all images from the current page siblings.
for eg. I got two parents (Hockey and football) with children.
In all this children I got one or several images attached (I've ...
7
votes
1answer
649 views
Custom Nav walker display current menu item children, or siblings on no children
I've been messing around / searching for hours and still can't get this to work, so i'm finally giving in and asking for some help.
I'm trying to write a custom walker that shows only the current ...
0
votes
2answers
329 views
Menu Arrow for Child Element
I have a menu for a website I am designing and there are parent and child elements...I was wondering if there was someway I could add an arrow to my navigation if the parent has a child element?
My ...
0
votes
1answer
143 views
Check is category parent with ids from the childs - get_term_children
I have a hierarchical category list, like:
A (Parent Category)
- B (Child Category)
- C (Child Category)
- D (Child Category)
B (Parent Category)
- E (Child Category)
- F (Child Category)
...
0
votes
1answer
82 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 = ...
0
votes
2answers
115 views
Child Category Image
I have some code that display's the titles of my child category posts on one of my pages:
<?php
$parent = get_cat_ID("photos");
$cats = get_categories('child_of='.$parent);
foreach ...
-1
votes
1answer
176 views
How to create drop down for child categories of current taxonomy being viewed?
I need to know how can I get the child/grandchild terms of the current taxonomy being viewed, and put it into a drop down so that I can add values to the options.
I am currently using this code to ...
0
votes
2answers
84 views
Create subpage - filter parent pages list
I have a website here with a lot of content and with the content where is necessary to create pages in hierarchy. But it is uncomfortable to go through the dropdown in the administration with a lot of ...
0
votes
1answer
38 views
how to list subpages in sidebar without widget
I am trying to create a list of subpages of a parent page, which will appear in the sidebar of my wordpress site. This sidebar will appear on every page.
So for example, I have a page with an ID of ...
1
vote
2answers
139 views
Query Posts Exclude Entire Category
I am using the standard wordpress loop that looks like:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
...
2
votes
1answer
163 views
Get the children of the parent category
I'm trying to get all the children categories to display in this loop but I'm struggling with the code. This is what I have so far.
<?php $args=array('orderby' => 'name', 'order' => 'ASC');
...
2
votes
1answer
97 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
1answer
461 views
How can I make wp_list_categories output li with category-slug as class, for its children?
Simply put, I'd like to change the wp_list_categories output from this:
<li class="cat-item cat-item-1"><a href="http://mysite.com/category/articles">Articles</a></li>
...
0
votes
1answer
542 views
Setting parent menu item href to javascript:void(0) [closed]
Ok, worked out how to do it, but wanted to know if this is the preferred method of doing it or if there was a better way.
What I have is this..
<script type="text/javascript">
...
1
vote
1answer
167 views
Show children of top level category only
Imagine i have a URL structure like this: www.domain.com/category/subcategory/
This is my code:
<?php
$args=array(
'child_of' => $cat-id,
'hide_empty' => 0,
'orderby' => ...
0
votes
1answer
315 views
How to get the top most term (top ancestor) of a custom taxonomy child term?
I need to get the topmost term (top level ancestor) of a taxonomy term.
Suppose the following term hierarchy:
North America
United States
New York
New York ...
0
votes
0answers
63 views
How to get the hierarchy position of a taxonomy term? (how many children after / how many ancestors before)
I have a taxonomy "location"
In this taxonomy I list locations, hierarchically, from country to state to city. For example, consider the following terms nested like so:
1. European Union
...
0
votes
1answer
186 views
Query Posts with MetaValue & MetaKey & SortOrder works, but it doesn't override category order [closed]
I have a query, ordered correctly by the meta_key in ascending order, but they are devided into groups of their category.
This example shows the postorder in the WP category editor:
Cat 6
- sub 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
4answers
809 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
246 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
134 views
Can you exclude child pages of a specific parent within a navigation?
For example, I'm using wp_list_pages to display the navigation, the child pages (and their children) appearing on hover as is typical. However, I want one of these parents to not display the children. ...
1
vote
1answer
610 views
Child pages on hierarchical Custom Post Types 404s
I've been working with Custom Post Types lately and haven't had any major problems. This time I'm trying something new. I want to create a CPT which basically works like Pages, with page hierarchy.
...
0
votes
1answer
592 views
Want Page Descendants when using query_posts post_parent or child_of
I'm trying to use query_posts to list all descendants of a page ID. Using post_parent only lists the first-level children.
This Trac ticket seems to address it: ...
0
votes
1answer
327 views
how to display page title only for child category pages
I apologize if this is a dumb question, but I am just learning PHP and Wordpress. It's probably very simple.
I have a site where the top-level nav is all parent categories, with the child categories ...
0
votes
1answer
136 views
Only looping through pages that have children or subpages
I have a custom post type called "films", and most films have a subpage (child page) called "press".
I am trying to loop through the films, and check to see if a subpage exists. If a subpage exists, ...
0
votes
2answers
468 views
Multiple Loops That Pull Pages (Child/Grandchild) While Styling the First Entry
This is either something really simple that I've orchestrated into a complex problem or it really is a complex problem.
I've decided to use pages to display information. If I go to a page called ...
0
votes
1answer
168 views
Give Children Unique ID's
Is there a way I can give each wordpress children (subcategory UL lists) unique ID's? I'm creating a dropdown list for subcategories and I want to position them but :nth-child isn't supported by ...
0
votes
2answers
392 views
Differentiate Between Parent & Child Categories
So I'm working with a non-wordpress theme called "Misty" and it uses this code to pull categories:
<li class="sidebox">
<h3><?php _e('Categories','ml'); ?></h3>
<ul ...
0
votes
1answer
68 views
Check for parent category
Code below is designed for testing to see if current post is in a category that is an ancestor (child/grandchild/greatgrandchild etc) of cat number 526
$cats = wp_get_post_categories();
if ...
1
vote
2answers
639 views
Exclude the parent custom post-type posts only
Not sure if this is possible without some form of hard-coding but I have a custom post-type called 'city'. Within the 'city' post-type I have some parent post (e.g. England, America and China) and ...
0
votes
1answer
1k views
Display Child Categories of Current Post ID
I'm starting to love this place more and more, super helpful!
Anyway, todays dilemma is as such:
I want to display as a list the child terms only, of a specific parent term, of a custom taxonomy, ...
1
vote
2answers
3k views
Show just one level of child pages, wp_list_pages woe
I'm working on a site that has a fairly large page structure a few levels deep - in some sections there are a lot of pages.
The basic setup is something like this...
Parent
Parent
Parent
-Child
...
0
votes
1answer
314 views
How to get post id of first child of the same post type?
Is there a function that will let me get the post id of the first child (of the same post type, not attachment)? I could always just run a loop via wp_query but that seems like overkill. :/
The goal ...
0
votes
1answer
657 views
Exclude Child Posts from WP_Query
How can I exclude child posts using wp_query? Given the following architecture:
parent 1
child 1
child 2
parent 2
child 3
child 4
I'd like to only return parent 1 and parent 2, and exclude ...
0
votes
1answer
287 views
add slug of child(ren) to li using wp_list_pages
For a page template I am trying to include the 3 children of each page. That works fine.
However as I want to include a different image for each of the children, I would like to add the slug of each ...
0
votes
1answer
534 views
Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
Say, for example, I have the following custom taxonomy:
Term 1
Term 1.1
Term 1.2
Term 1.2.1
Term 1.2.2
Term 1.3
Term 2
Term 2.1
How can I get the children terms of Term 1, ...
0
votes
1answer
439 views
How can I automatically add child pages to pages in a WP menu?
In the WP menu creation GUI there's the Automatically add top level pages option. I would like to do the opposite, for any page that is in the menu, automatically add it's child pages. Is there a way ...
0
votes
1answer
439 views
How to make a query returning pages from multiple parents
I'd like to make a query that returns the children pages of various parent pages.
Unfortunately the post_parent attribute of WP_Query accepts only one value.
What do you suggest ?
0
votes
1answer
222 views
How can I build a query that returns all attachments of a page and it's children pages?
I'm using this query to return attachments of a page.
$args = array(
'post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment'
);
Is there a way to ...
0
votes
2answers
358 views
Depth problem using wp_list_pages for subnavigation
I've been looking for a solution to my problem for some time now, and I can't seem to find one.
I have created a submenu using the following code from the Codex:
<?php
if($post->post_parent) ...
3
votes
1answer
370 views
How do I create a magazine type menu - sub-menu setup using wp_nav_menu and child of twentyten? [closed]
I'm trying to create a menu and submenu with a child theme of twentyten, similar to this at the LA Times: http://www.latimes.com/ where when the site is first opened, it displays a set of childs, and ...
2
votes
1answer
428 views
Get threaded comments number
I'm using Greg's Threaded Comment Numbering plugin to number the comments. Actually I'm displaying a number beside of each parent comment (no threaded comments numbers). I have 2 problems that I have ...
0
votes
1answer
720 views
Displaying Custom Taxonomy Children in Dropdown
I have a question I hope you can help me with. I have a custom taxonomy called locations and on the first level I have the areas (Asia, Europe, etc) and under each area I have countries (England, ...
5
votes
3answers
655 views
Can I display submenus in groups, using wp_list_pages?
Say I have top-level(parentless) pages called Fruit, Animals, Cars.
When, say, Fruit is selected I would like to show links to the individual fruit pages below. I would like to be able to dislpay ...