[wp-hackers] custom post types and child pages

Jesus Lizama beautifulcrimes at gmail.com
Sat Apr 30 19:19:14 UTC 2011


I'm having a similar problem. Any help would be appreciated!

Also, has anyone had issues with next_posts_link() and previous_posts_link()
when using custom taxonomies and permalink structures? I can't get the
paging to work on custom taxonomy template files. :(


On Sat, Apr 30, 2011 at 12:13 PM, Steve Taylor <steve at sltaylor.co.uk> wrote:

> Hi,
>
> I've got a couple of questions about Custom Post Types which have come
> up in the client project I'm working on. For now I'm suggesting they
> just re-arrange the IA to avoid these issues, because I'm not sure
> what they're after is possible. However, I'm curious whether anyone
> thinks there are possibilities worth exploring.
>
> They're both to do with child pages, one relating to CPT archives and
> one relating to CPT single post views.
>
> CPT ARCHIVES
>
> Say I have "projects" as a CPT. The archive page is defined as living here:
>
> /research/projects/
>
> Now, this is also an actual WP page, which I use to manage the intro
> to the archive list etc. The URL for a project will of course be:
>
> /research/projects/project-x/
>
> But what if they have some other information about projects and they
> want a standard WP page here:
>
> /research/projects/info/
>
> This gives a 404 - presumably because the rewrite rules signal that
> we're looking for a project and there's no project with the slug
> "info".
>
> For now I've advised that they make anything planned as a child page
> of /research/projects/ into a sibling page - not too much of a
> sacrifice, and very easy. However, I wonder if there's a way to step
> into the rewriting process and say, "If there's no CPTs found under a
> CPT archive URL, look for child pages of the page that has the same
> URL as the CPT archive"? If anyone's achieved this, do let me know.
>
> CPT SINGLE POST VIEWS
>
> The other issue is that the ideal situation for this project is to
> have child pages of CPTs. So if there's a project at this URL:
>
> /research/projects/project-x/
>
> As well as the main page, there might be an extra page for this project:
>
> /research/projects/project-x/extra/
>
> Or more... The whole idea doesn't make sense to me in WP terms - that
> child couldn't be a page with a CPT as a parent.
>
> I've tried making the CPT hierarchical, but it doesn't seem to make
> sense to have a project as a child of a project for what I'm talking
> about above. Besides, the child page throws a 404 :-\
>
> Anyway, anyone wrestled with this stuff before?
>
> cheers,
>
> Steve Taylor
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Jesus Lizama
Developer/Designer
Spifffy.com | ConquerLA.com
Cell: (323)336-2953


More information about the wp-hackers mailing list