Viewing 4 replies - 1 through 4 (of 4 total)
  • WordPress will automatically do a redirect if you change a slug. Also if you change the slug from category-a to category-b.

    Possible solution: https://wordpress.stackexchange.com/questions/71927/how-to-prevent-automatic-redirection-of-404-errors-and-incorrect-urls

    Thread Starter tomscottjsh

    (@tomscottjsh)

    Hi Threadi,

    Thank you for that!

    Side note: Without changing anything, this morning Semrush is showing only 54 redirects, down from about double that. I have only about ten in Redirection. So moving in the right direction on its own maybe?

    I added “remove_action(‘template_redirect’, ‘redirect_canonical’);”
    to the bottom of: jeanscotthomes/wp-content/themes/sesame-child/functions.php

    Is that correct?

    I tested some redirects showing in Semrush and they are still redirecting, but some seem to be actually going to the right place, which is an Elementor post templated page. Some are showing the generic wordpress Category page.

    In Yoast, I have the “Add /category/ to the URL turned on. The generic pages do not show /category/ in the URL.

    I’ll let this simmer over the holiday weekend (Memorial Day here in the US on Monday) and see what it looks like on Tuesday.

    Do you have any other ideas or suggestions?

    Thank you! And have a great weekend!

    Yes, your addition in functions.php is technically correct – provided you set the quotation marks correctly and not as they appear in your post without the code block. Correct would be:

    remove_action('template_redirect', 'redirect_canonical');
    Thread Starter tomscottjsh

    (@tomscottjsh)

    I will double check that all again on Tuesday. I will let you know. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mystery Redirects’ is closed to new replies.