Plugin dev add_rewrite_rule – not adding to db?
-
Hi All,
I’m trying to write a plugin for WordPress 2.6 that will add a rewrite rule. I’m following the instructions listed at this post http://wordpress.org/support/topic/208830?replies=6[code]
function wftp_rewrite() { add_rewrite_rule('wftp/([^/]+)/?$', 'index.php?wftp=$matches[1]','top'); } function wftp_vars($public_query_vars) { $public_query_vars[] = 'wftp'; return $public_query_vars; } add_filter('query_vars', 'wftp_vars'); add_action('init', 'wftp_rewrite');[/code]
I think my code is almost identical, but it doesn’t look like WP is adding the rewrite to the database. Going to the Links section of WP admin doesn’t do the trick either.
Is there something else I need to do in my code to flush the rewrite_rules?
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Plugin dev add_rewrite_rule – not adding to db?’ is closed to new replies.