[Plugin: WP No Category Base] compatibility with qTranslate plugin
-
THE PROBLEM:
I am using the language plugin qtranslate to create a bilingual site, italian as default language and english as second language. I’ve setted qTranslate to add a locale abbreviation to urls for the second (and eventually all other) language(s):https://domain.com/nameofcat for default lang (italian)
https://domain.com/en/nameofcat for englishAs i’ve installed and enabled the WP No Category Base Plugin, the locale abbreviation has been removed from every url, and now WP shows every page in the default language and I have to switch to english every time.
THE SOLUTION:
Creanodesign, on the qTranslate forum, has found the solution to the incompatibility between “WP No Category Base” and “qTranslate”.
You can read about it there:https://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=993&p=5893#p5893
just find the 2 occurences of this line in no-category-base.php:
$catlink = trailingslashit(get_option( 'home' )) . user_trailingslashit( $category_nicename, 'category' );
and change them to
if (function_exists('qtrans_convertURL')) $catlink = trailingslashit(qtrans_convertURL(get_option( 'home' ))) . user_trailingslashit( $category_nicename, 'category' ); else $catlink = trailingslashit(get_option( 'home' )) . user_trailingslashit( $category_nicename, 'category' );
Hope it can be useful
https://www.ads-software.com/extend/plugins/wp-no-category-base/
- The topic ‘[Plugin: WP No Category Base] compatibility with qTranslate plugin’ is closed to new replies.