Check If Taxonomy A and Taxonomy B has same Slug, 301 Auto Redirect Tax A to Tax B if True in Wordpress
Please How do I achieve this?
I have WordPress Default Taxonomy - Tag and a custom Taxonomy - Artist.
I want to check for TAGS that have the same slug as ARTIST and 301 redirect it to the ARTIST.
Example Check If: website.com/tag/drake and website.com/artist/drake have the same slug which is true.
then
Automatically 301 Redirect: website.com/tag/drake to website.com/artist/drake
If the slug is not the same, then do nothing.
I found this Answer but it's not exactly what I need and I don't know how to make it solve my problem. I am very new to WordPress development.
Thanks
Topic wp-redirect slug custom-taxonomy redirect Wordpress
Category Web