Created
November 6, 2018 05:34
-
-
Save kLOsk/4956d724d8f22215b1fbde918e7f88cc to your computer and use it in GitHub Desktop.
wc vendors PLL rewrite fix test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DK_pll_rewrite_basic() { | |
add_rewrite_rule('(en|de)/(dashboard)/(product)/?$', 'index.php?lang=$matches[1]&pagename=dashboard&object=product', 'top'); | |
add_rewrite_rule('(en|de)/(dashboard)/(product)/(edit)/?$', 'index.php?lang=$matches[1]&pagename=dashboard&object=product&action=edit', 'top'); | |
//add_rewrite_rule('(en|ja)/(product-category)/(.+?)/?$', 'index.php?post_type=product&product_cat=$matches[3]', 'top'); | |
} | |
add_action('init', 'DK_pll_rewrite_basic', 10, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment