Support » Plugin: Better WordPress Google XML Sitemaps (support Sitemap Index, Multi-site and Google News) » Rewrite rules missing for custom posts and taxonomies

  • Resolved crowinck


    This plugin causes WP_Rewrite to generate rewrite rules with custom post and taxonomy rules missing, therefore making links to those posts and taxonomies break when permalink setting is non-default.

    Problem can be intermittent but it’s triggered when rewrite rules are flushed.

    Otherwise it’s a great plugin, but this is a serious problem. Please fix.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Khang Minh


    Hi crowinck,

    What is your current permalink settings? Do you have an example website so I may take a look? Or if that’s not possible, a simple example might explain the issue better.


    Permalink settings are at “day and name.” I haven’t tried the other non-default settings, but I doubt it would make a difference.

    Once the plugin is activated, and rewrite rules are flushed, permalinks to custom taxonomies (and almost certainly custom post types) lead to 404 pages. The problem is often corrected by resubmitting the permalink form (not just by visiting the permalink settings page) though I’m not sure exactly why. However, once anything in the system triggers a rewrite rule flush, it reappears.

    I took a peak at the wp_rewrite object and found that during problem periods all the rewrite rules for custom posts and taxonomies are missing.

    As soon as the plugin is deactivated, everything works fine.

    I could reactivate the plugin on our development version of the site, flush the rules, and make it public so you could see, but I don’t think you’d get much out of it – just “yep, those custom taxonomy links lead to 404 pages.” I’m happy to answer any additional questions you have.

    Plugin Author Khang Minh


    Thank you for your answers, crowinck, they are very helpful.

    This might be a conflict with the custom post types / taxonomies plugin you are using or the way you are adding them, though I’m not entirely sure either, because those custom things are working fine for other people.

    Anyway, may I have a list of plugins used on your site? And may I know how you register custom post types and taxonomies?

    Thank you.

    Most Popular Posts
    postMash (Filter) – (hacked up version, but it doesn’t make any rewrites or do other work with the rewrite object)
    Taxonomy Widget (I display tax links via this plugin and also custom widgets of my own, their behavior was normal)
    Term Management Tools
    User Role Editor
    Wordpress Video Plugin

    Custom post types and taxonomies are registered by me via an action hooked to init. Futzing with the rewrite args made no difference (well, I could tell WP not to use rewrite for them at all, but that’s not a solution so much as an ugly work-around). My code is pretty standard looking and too long to post here, but I could put it somewhere for display if you really want to see it.

    Plugin Author Khang Minh



    Futzing with the rewrite args made no difference (well, I could tell WP not to use rewrite for them at all, but that’s not a solution so much as an ugly work-around).

    I don’t want that either ;).

    Anyway, please send the block of codes you use to register custom things through the contact form here: If it’s possible, please send me the whole file in which you do that (functions.php?).

    Thank you.

    Sorry it took me a while to get back to you. I have a lot of function code split into 6 different files, so I wanted to replicate the problem in a setting that would eliminate most of that as the issue so you didn’t feel the need to go through it all, and it took me a couple days to get to it.

    I have recreated the error on a different site on yet another server, it’s version 3.1.2. It used a child theme of Twentyten with only one thing different – the functions that register custom tax and posts are added in. I will send you the code for that via your contact form.

    The only active plugins were yours and taxonomy widget – as an easy way to display the links. It was using the default settings of your plugin.

    Plugin Author Khang Minh


    Please update to 1.1.1 and tell me if it works for you, thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Rewrite rules missing for custom posts and taxonomies’ is closed to new replies.