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

scribu scribu at gmail.com
Sun Apr 18 10:01:13 UTC 2010


I mean:

$wp->add_query_var('financial-term');
$wp_rewrite->add_rewrite_tag("%financialterm%", '([^/]+)',
"financial-term=");
$wp_rewrite->add_permastruct('financial-term', '/%financialterm%');


On Sun, Apr 18, 2010 at 12:59 PM, scribu <scribu at gmail.com> wrote:

> On Sun, Apr 18, 2010 at 12:39 PM, Mike Schinkel <
> mikeschinkel at newclarity.net> wrote:
>
>> 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.
>>
>
> Then maybe something like this:
>
> $wp->add_query_var('financial-term');
> $wp_rewrite->add_rewrite_tag("%financialterm%", '([^/]+)',
> "financial-term=");
> $wp_rewrite->add_permastruct($tag, '/%financialterm%');
>


-- 
http://scribu.net


More information about the wp-hackers mailing list