Auto post redirection

#512929
  • Resolved Oded Talmon
    Rank Math free

    Hello,
    Under “Redirections” it says:

    Extend the functionality of WordPress by creating redirects in our plugin when you change the slug of a post, page, category or a CPT. You can modify the redirection further according to your needs.

    However, I couldn’t find how to modify this behavior further. I read all of the hooks and filters documentation and couldn’t find what I’m looking for.

    I would like this to happen: If a product is being trashed/deleted a new redirection to the homepage will take place.

    Can I simply use the 404 Monitor for this purpose?

    Please help!
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Md. Sakib Khandaker
    Rank Math agency

    Hello,

    Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.

    You can simply set a fallback behavior for those 404 pages to be redirected to your homepage.

    Please follow the instructions below to set a fallback behavior:
    https://rankmath.com/kb/general-settings/#fallback-behaviour

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you

    Oded Talmon
    Rank Math free

    Hello,
    This is helpful but I want this behavior to happen only when I delete Product posts. Is there a filter for this?
    Thanks

    Hello,

    Unfortunately, the Fallback behavior option applies to your whole site, and could not be limited to deleted products only.

    To achieve the function you’re looking for, then you may need to use a separate plugin or a writing a custom code for your site.

    Here’s a link you can check as well for that:
    https://wordpress.stackexchange.com/questions/210616/redirects-for-removed-deleted-woocommerce-products

    Looking forward to helping you.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Auto post redirection’ is closed to new replies.