Hello,
We apologize for the issue you are facing with the 404 errors on your category links when enabling the "remove parent slug" option. This can sometimes happen due to conflicts with theme settings or custom blocks in your mega menu.
Here are a few suggestions to troubleshoot this issue:
-
Check Permalink Settings: Ensure that your permalink settings are correctly configured in WordPress. Go to Settings → Permalinks and re-save your settings to refresh the permalink structure.
-
Clear Cache: If you are using any caching plugins, clear the cache to ensure that the changes take effect.
-
Theme Compatibility: Since you are using the Flatsome theme, check if there are any specific settings related to WooCommerce or permalinks in the theme options that might be causing this conflict.
-
Custom Block Configuration: Review the configuration of your custom block in the mega menu. Ensure that the links are correctly pointing to the updated URLs without the parent slug.
-
Disable Other Plugins: Temporarily disable other plugins to see if there is a conflict causing the 404 errors.
If these suggestions do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for raising this concern!
Sources:
How to Disable Custom Product Redirection in Rank Math » Rank Math
Done everything. Please help.
Hello,
Thank you for updating us. We understand that you’ve already tried several troubleshooting steps without success.
To address the 404 errors on your category pages when using the “remove parent slug” option, please try disabling Rank Math’s custom product redirection. Add the following code to your theme’s functions.php file:
/**
* Filter to disable custom product redirection.
*/
add_filter( 'rank_math/woocommerce/product_redirection', '__return_false' );
For more information on how to add code to your site, you can refer to this guide: WordPress Hooks, Actions, & Filters(https://rankmath.com/kb/wordpress-hooks-actions-filters/).After adding this code, clear your site cache and check if the issue is resolved. If you continue to experience problems, please let us know, and we’ll assist you further.
After adding the code, head over to your WordPress Dashboard → Settings → Permalinks and save the page without changing anything.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
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.