[wp-hackers] Custom post-types and taxonomy rewrite

Dan Smart dan at dansmart.co.uk
Sun Aug 22 08:38:40 UTC 2010


This is being solved here, and is worth checking out: http://somadesign.ca/projects/smarter-custom-post-types/

It uses a combination of the 'generate_rewrite_rules' filter and the 'template_include' filter to cater for the rewrite, with an appropriately named template.


(Sent from iPhone)
Dan Smart - Web Developer
www.dansmart.co.uk

On 22 Aug 2010, at 01:35, Lox <lox.dev at knc.nc> wrote:

> Hello,
> 
> I give a lot of importance in my url. I have a post-type called 'schools'
> and a taxonomy for it called 'type'. The rewrite for the post-type is
> 'school' so http://mysite.com/school/the_school_name/ is giving me the page
> for "the_school_name" school.
> 
> Now I need to categorize them, so I created a taxonomy called 'school_type'.
> How can I have the 'school_type' slugs in front of the schools permalinks ?
> 
> Basically I need to have:
> 
> http://mysite.com/school/the_school_type/the_school_name/
> 
> I tried to add %category% to the postype rewrite parameter but it failed.
> 
> Best regards
> 
> -- 
> Lox
> lox.dev at knc.nc
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list