• Hi,

    I see this hasn’t been updated for almost a year. Are there any plans to upgrade this (or an alternative)?

    Thanks

    osu

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hugh Mandeville

    (@hughmandeville)

    To get the plugin to work with permalinks in WP3.1, you need to update the redirect_canonical() function in wp-includes/canonical.php. On line 167 wrap the following code:

    $tax_url = parse_url($tax_url);
    if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=..
        parse_str($tax_url['query'], $query_vars);
        $redirect['query'] = add_query_arg($query_vars, $redirect['query']);
    } else { // Taxonomy is accessable via a "pretty-URL"
        $redirect['path'] = $tax_url['path'];
    }

    in an if (is_tax()) block:

    if (is_tax()) {
        $tax_url = parse_url($tax_url);
        if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=..
            parse_str($tax_url['query'], $query_vars);
            $redirect['query'] = add_query_arg($query_vars, $redirect['query']);
        } else { // Taxonomy is accessable via a "pretty-URL"
            $redirect['path'] = $tax_url['path'];
        }
    }

    I am not sure how the plugin can be updated to get around the WP3.1 problem where with permalinks on, the date and category URL does not show a page of posts for the particular date and category.

    /category-label/2011/04

    If someone can come up with a URL that shows posts for a particular category and date with permalinks set in WP3.1, we can update the plugin to use that URL pattern.

    We could also create a forum post about the date and category page not working with permalinks in WP3.1.

    Thread Starter Osu

    (@mrnabo)

    Hi Hugh,

    Thanks for getting back to me. I agree, I think this is something the WP team should change in their canonical function you mentioned – frustrating how they change the core in such a way that plugin developers are cornered with their development.

    Do you think there’s a way of doing this by creating a function in functions.php? At least that way, the core edit could be kept within the theme folder.

    I agree that posting in the forums about the date and category pages not working 3.1 would be a good idea – do you want to do it, or should I? You’ll probably have more ‘authority’ on the issue considering you know more about it than me!

    Thanks

    osu

    Plugin Author Hugh Mandeville

    (@hughmandeville)

    Just checked, seems to be working correctly in WP 3.1.1.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: wp-category-archive] Broken in WP 3.1’ is closed to new replies.