How to prevent WordPress from redirecting single page to prefixed category archive with same name?

I have been trying to solve this problem for hours. I would like to have a page with a simple slug (/blog) and a category term with the same name (/category/blog) exist on my site together at the same time. But the problem I am running into is that my page (/blog) keeps redirecting to the category archive page (/category/blog).

I have tried the following:

  • adjusting my permalinks by clearly specifying my category base
  • using remove_action(‘template_redirect’, ‘redirect_canonical’); to suppress redirects
  • using add_filter( ‘template_redirect’, ‘blog_redirect_filter’, 10, 3 ); to try and target my blog category specifically

I am running out of ideas. How can I stop my site from redirecting an existing page to a category archive when they each have different slugs?


I figured it out! Classic wait-until-you-post-publicly-before-figuring-it-out-yourself problem. It was a fun mix of Yoast, custom permalinks, and category bases all conflicting with each other.

My answer:

  • Make sure your category base is specified in Permalinks. Save them.
  • Remove any custom permalink slugs in the category terms.
  • Go to Yoast > Search Appearance > Taxonomies and scroll to the very bottom. Make sure Category URLs is set to Keep.
  • Clear any cache and/or flush_rewrite_rules.
  • Voila it’s fixed.

Go to Source
Author: Beth Mac

Site using static homepage, redirects (301) and removes pluses from query string

It seems as though all WordPress sites that I’m supporting for various clients has this same functionality — if the site is using a static homepage, and you visit the homepage with a query string containing + signs — the page is redirected (301) and the plus signs are turned into %20 — Interior pages and posts do NOT suffer this same effect.

For example (I am not supporting this site, just using it as an example): (redirect occurs) (no redirect occurs)

Another example: (redirect occurs) (no redirect)

Our site analyst (SEO, tracking, etc) uses plus signs in his data and this can be problematic. It seems that the homepage should NOT be doing this.

Is there a way to override this functionality, or is this a bug in WordPress?

This also does not seem affect sites that don’t use the “static homepage” option.

Go to Source
Author: kevindeleon

Erase the HTML website and replace it with a WordPress website -301 Redirection

We are going to erase the HTML website and replace it with a WordPress website (New redesigned site).
We already have 301 redirection( http to https) in .htaccess file. Is this 301 redirection is enough for maintain the SERP ranking/pass the link juice.
Is we need to add extra page level 301 redirection for all the pages/important pages to its corresponding wordpress pages.

Eg : /about.html to /about

Go to Source
Author: jeens