clockwork.gr
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [YITH WooCommerce Wishlist] Polylang Compatibility: Permalink IssueIn case anyone runs into this issue:
Fixed it by hardcoding the relevant permalinks.
Auto generated ones are:
[(([^/]+/)*{wishlist-page-slug})(/(.*))?/page/([0-9]{1,})/?$] => index.php?pagename=$matches[1]&wishlist-action=$matches[4]&paged=$matches[5] [(([^/]+/)*{wishlist-page-slug})(/(.*))?/?$] => index.php?pagename=$matches[1]&wishlist-action=$matches[4]Just add your language ones with the lang prefix in functions.php as follows:
function YITH_polylang_rewrite_rules() { //Lang 1 add_rewrite_rule('{lang1-slug}/(([^/]+/)*{wishlist-page-lang1-slug})(/(.*))?/page/([0-9]{1,})/?$','index.php?pagename=$matches[1]&wishlist-action=$matches[4]&paged=$matches[5]'); add_rewrite_rule('{lang1-slug}/(([^/]+/)*{wishlist-page-lang1-slug})(/(.*))?/?$','index.php?pagename=$matches[1]&wishlist-action=$matches[4]','top'); //Lang 2 add_rewrite_rule('{lang2-slug}/(([^/]+/)*{wishlist-page-lang2-slug})(/(.*))?/page/([0-9]{1,})/?$','index.php?pagename=$matches[1]&wishlist-action=$matches[4]&paged=$matches[5]'); add_rewrite_rule('{lang2-slug}/(([^/]+/)*{wishlist-page-lang2-slug})(/(.*))?/?$','index.php?pagename=$matches[1]&wishlist-action=$matches[4]','top'); // .... and so on } add_action('init', 'YITH_polylang_rewrite_rules', 10, 0);Alex
Viewing 1 replies (of 1 total)