[wp-hackers] Help with wp_rewrite?

Jennifer Hodgdon yahgrp at poplarware.com
Sat Dec 1 03:19:15 GMT 2007


Derek -- as someone else mentioned, the key is that you need to flush 
the rewrite rules as well as definining a filter for 
generate_rewrite_rules.

The last example at the bottom of this Codex page spells this out:

http://codex.wordpress.org/Custom_Queries

It builds upon other examples that show all the pieces you should need 
to do what you are trying to do. At least, I hope so. :)

     --Jennifer

Derek Hogue wrote (in part):
> It's pretty simple - I'm looking for a way to add a simple Rewrite tot 
> he WP Rewrite rules..  Following the codex example, and other examples, 
> this seems like it should work:
> 
> function gigpress_feed_rewrite($wp_rewrite) {
>     $feedrules = array('^shows.xml$' => 
> 'wp-content/plugins/gigpress/feed.php');
>     $wp_rewrite->rules = $feedrules + $wp_rewrite->rules;
> }
> 
> add_filter('generate_rewrite_rules', 'gigpress_feed_rewrite');
> 
> But no go - I just get redirected back to my index. [...]


-- 
Jennifer Hodgdon

Poplar ProductivityWare * www.poplarware.com
Web Databases/Scripts * Modeling/Analysis/Palm OS Software



More information about the wp-hackers mailing list