[wp-hackers] Need Custom Post Type Rewrite Help, Please

Mike Schinkel mikeschinkel at newclarity.net
Sun Apr 18 09:39:59 UTC 2010


Thanks for the quick answer.  Are you saying I need to add 700+ rewrite rules, one for each financial term?  I'm hoping that won't be a requirement.  I'm hoping to write one rewrite rule to capture every financial term.  

-Mike


On Apr 18, 2010, at 5:17 AM, scribu wrote:

> Maybe something like this:
> 
> foreach ( $pages as $page )
>    add_rewrite_rule('http://example.com/' . $page->page_name,
> '?post_type=x&p=' . $page->ID, 'top');
> 
> 
> Not sure wether you need to have 'http://example.com/' at the beginning or
> not.
> 
> 
> -- 
> http://scribu.net
> _______________________________________________
> 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