Forums

Plugin API: WP_Rewrite, implementation help needed (2 posts)

  1. sunshine
    Member
    Posted 3 years ago #

    I posted about this before, but didn't get anywhere (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?

  2. sunshine
    Member
    Posted 3 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic