Title: Plugin API: WP_Rewrite, implementation help needed
Last modified: August 18, 2016

---

# Plugin API: WP_Rewrite, implementation help needed

 *  Resolved [Mary Linville](https://wordpress.org/support/users/sunshine/)
 * (@sunshine)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/plugin-api-wp_rewrite-implementation-help-needed/)
 * [I posted about this before, but didn’t get anywhere](https://wordpress.org/support/topic/57240?output_format=md)(
   going on a month since). I cannot seem to be able to add to, modify or remove
   permalinks via the plugin API (specifically, WP_Rewrite).
 * Here is an extreme example, for the purpose of illustration, which I’ve placed
   in my active theme’s functions.php file (doesn’t work as a plugin either):
 * `function customize_permalinks($rules)
    { return array(); }
 * add_filter('rewrite_rules_array', 'customize_permalinks');
 * That _should_ remove all permalinks, correct? Well, it doesn’t, a `print_r()`
   of `$wp_rewrite->rules` shows that they are all _still_ there, and they all _still_
   work.
 * What’s wrong?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Mary Linville](https://wordpress.org/support/users/sunshine/)
 * (@sunshine)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/plugin-api-wp_rewrite-implementation-help-needed/#post-341984)
 * Okay, I have also tried using both the Ultimate Tag Warrior and Feed Director
   plugins, and both do **not** work, the urls that is – trying to view the urls
   supported causes 404s.
 * Regular clean permalinks (pages, posts, categories, etc) work fine, but not permalinks
   added through the plugin api. So I now know it’s not just my attempt.
 * Any ideas what’s the deal here?

Viewing 1 replies (of 1 total)

The topic ‘Plugin API: WP_Rewrite, implementation help needed’ is closed to new 
replies.

## Tags

 * [add_filter](https://wordpress.org/support/topic-tag/add_filter/)
 * [WP_Rewrite](https://wordpress.org/support/topic-tag/wp_rewrite/)

 * 1 reply
 * 1 participant
 * Last reply from: [Mary Linville](https://wordpress.org/support/users/sunshine/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/plugin-api-wp_rewrite-implementation-help-needed/#post-341984)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
