0
votes
1answer
44 views

How do I sort post listing by child post count?

I have two custom post types called questions and answers. The questions list includes a custom column which displays a count of the answers for each question. I need to be able to sort the listing ...
0
votes
2answers
134 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
232 views

Custom Post Type children and grand-children in one list

So, here is the story: i made a product catalogue with 3 custom post types: - Product - Filegroup (Child of Product) - File (Child of Filegroup) When on product page it should show a ...
2
votes
1answer
1k 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
174 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, ...
1
vote
2answers
1k 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 ...