[BUG] Plugins removes translated custom taxonomy
-
Carlos, Pedro.. & WP community
I’m trying to achieve the following URL structure for a multilingual site with custom post types:
https://domain.com/custom-post-type-name/custom-post-type-taxonomy/post-nameThis is the scenario:
Wordpress v4.5.1
Custom Post Type UI v1.3.4
Custom Post Type Permalinks v1.5.2
qTranslate-X v3.4.6.7
&
qTranslate slug v1.1.18
(Everything up to date so far)Before activating qTranslate-X and qTranslate slug, I’m able to achive the desired domain mentioned above.
qTranslate-X lacks the posibility of translating a taxonmy.
Thats when I need to install qTranslate slug, which works great for me since I can translate both: custom taxonomy name & custom taxonomy slud.
BUT. It does remove for the custom-post-type-taxonomy from the permalink structure which I previously added using the “Custom Post Type Permalinks” plugin.There’s a missing conditional for scenario where the are BOTH:
– custom post types &
– custom taxonomiesMy best hinch, is that this conditional is missing here:
if ( taxonomy_exists($name) ) { $type = 'taxonomy'; } else if ( post_type_exists($name) ) { $type = 'post_type'; } else { return false; } $qts_options = $this->get_options(); $option_name = QTS_PREFIX . $type . '_' . $name;
…but I don’t know how to concatenate two options names
THE PRACTICAL EXAMPLE > An Artist Multilingual Site
DESIRED:
[English – qTranslate default language]
https://the-artist.com/paintings/collection-name/painting-name
[Spanish – qTranslate alternative language]
https://the-artist.com/es/pinturas/nombre-coleccion/nombre-pinturaUsing only:
– Custom Post Type UI v1.3.4
– Custom Post Type Permalinks v1.5.2
I’m able to achieve this url for the painting single view:
https://the-artist.com/paintings/collection-name/painting-name OR
https://the-artist.com/LANG/paintings/collection-name/painting-name
setting my Permalink Settings for Custom Post Types to: /%collection%/%postname%/Once both qTranslate-X and qTranslate slug plugins are activated, and I do the pertinent translations on the “Qtranslate Slug options” page, custom taxonomy is removed from URL, and I only get:
https://the-artist.com/paintings/painting-name OR
https://the-artist.com/LANG/paintings/painting-name<hr>
<u>I have the development site ready for testing purposes.</u>
I’ll be glad to provide a url, user, and pass privately if someone would like to check the scenario.Best Regards!
Juan
- The topic ‘[BUG] Plugins removes translated custom taxonomy’ is closed to new replies.