-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle to remove category base from taxonomies #686
Comments
Hi @sybrew , |
I usually use https://wordpress.org/plugins/remove-cpt-base/ to remove the base slug of the Custom Post Type and keep the taxonomy base slug. If this feature is available, it will create many new conveniences in making our website. Customers often request to remove the taxonomy base slug. |
I always intend to support all custom post types with every feature I create, but this isn't always feasible. WooCommerce already supports this feature out of the box. I don't know which version they added it to, but you can learn more about it here: https://woocommerce.com/document/custom-permalinks-for-woocommerce/. I cannot give technical details about the planned feature yet because I still need to get started on it. I think the best way to implement this is by adjusting the WP_Rewrite API. So, yes, |
With WooCommerce as you answered, they recommend a paid plugin: https://woocommerce.com/products/custom-permalinks-for-woocommerce/ We can refer to how they work. I still hope that your new feature will support WooCommerce. It is a perfect integration and it also affects your new Breadcrumb feature. You are right, other plugins that use the dependency on 🐻 |
Hi, |
Thank you. I read over the part where a paid plugin was required for this. I am already versed in Rewrite Rules, but thanks for giving pointers. Basically, everyone's doing it wrong thanks to harmful code from StackOverflow and StackExchange, and the API doesn't appear to get fixed. All this is why TSF doesn't create rewrite rules since 2019:
It's essentially why I kept dismissing this feature and redirected users to another plugin. However, this ticket might've addressed some issues in WP 6.4 and higher: https://core.trac.wordpress.org/ticket/58998. |
Hi, |
jumping in to +1 this feature for production release and get on the notifications train for this one. Very much would like to see this in the plugin :) Thx EDIT:
So with that said, is my use case, and hopefully the functionality being considered for this issue. |
Per @chuckreynolds's request, I created a snippet based on how Yoast SEO handles it, and I could only find myself stumping on rewrite issues. Maybe I've created a fault in the fork, but maybe it has always been broken. Here's the snippet: https://github.com/sybrew/tsf-snippets/blob/main/permalinks/remove-category-base.php. |
Follow up from 685:
Add a feature to remove the category base from URLs via the Rewrite API.
I often redirect users to this plugin, but given its prevalence as an SEO feature, we should also add it to TSF.
The text was updated successfully, but these errors were encountered: