[wp-hackers] child pages of custom post listing pages

Dion Hulse (dd32) wordpress at dd32.id.au
Sun Jan 2 23:57:10 UTC 2011


On Mon, 03 Jan 2011 02:03:21 +1100, Steve Taylor <steve at sltaylor.co.uk>  
wrote:
>
> But my info page would have to be something like:
>
> /campaigns-info/
>
> And in terms of how the site structure and nav appears to the user,
> I'd have to "fake" the above page being in the campaigns "section"?
>
> Am I looking at custom rewrite rules to have my cake and eat it?

2 options, rewrite rules for those specific pages
or, a 404 handler.
Upon hitting is_404() on the proper parse_request-related hook, check to  
see if post_type == campaign(or !empty(get_query_var('campaign'))), If it  
is so, Then restart the query looking for pages where post_name =  
'/campaign/' . get_query_var('campaign)

Cheers
Dion Hulse / dd32

Contact:
  e: contact at dd32.id.au
  Web: http://dd32.id.au/


More information about the wp-hackers mailing list