[wp-hackers] custom post types and child pages
Dion Hulse (dd32)
wordpress at dd32.id.au
Sun May 1 00:55:31 UTC 2011
On 1 May 2011 05:46, John Blackbourn <johnbillion+wp at gmail.com> wrote:
> On 30 April 2011 20:13, Steve Taylor <steve at sltaylor.co.uk> wrote:
> > 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 :-\
> For some reason hierarchical CPTs don't get hierarchical URLs. This
> has always been the case and I'm not sure why.
for CPT's, It's always been the case that they do get hierarchical url's *if
registered as a hierarchical type* AND the rewrite rules have been flushed
since you registered it like that. Often people will register it as
non-hierarchical, flush the rules, see everything is good, and THEN set it
to hierarchical and wonder why the url's are 404ing (they haven't flushed
their rules since setting the hierarchical flag);.
For Custom Taxonomies, Initially hierarchical taxonomies didn't support
hierarchical url's, Thats now supported, Pass rewrite =>
array('hierarchical' => true); to the args when you register the taxonomy.
On 1 May 2011 07:11, Joel Fisher <joelfisher at gmail.com> wrote:
> See if this solves your issues.
For that, I'd suggest looking into the 'has_archive' register_post_type
argument before attempting that plugin, It seems to duplicate what's in
More information about the wp-hackers