Conversation
supportHello, I’ve noticed just now plf doesn’t work on translated pages using WPML as the translation plugin.
Is there a reason for this? Doesn’t seem to reach the end of the Plf_filter function. Thanks. Merry Christmas
See the topic below https://wordpress.org/support/topic/wpml-issue-24/
The global wp_query never contains the page id for translated pages, despite the translated page just being a regular independent page.
$GLOBALS['wp_the_query'] = new WP_Query(); $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; $GLOBALS['wp_rewrite'] = new WP_Rewrite(); $GLOBALS['wp'] = new WP(); $GLOBALS['wp']->parse_request(''); $GLOBALS['wp']->query_posts(); This code seems to work at getting the page id of original pages, but when the page is a translation it doesn’t work. 🤔</img>
See https://wordpress.org/support/topic/wpml-slug-and-custom-post-types/#post-16390585
Is there a reason for this? Doesn’t seem to reach the end of the Plf_filter function. Thanks. Merry Christmas
See the topic below https://wordpress.org/support/topic/wpml-issue-24/
The global wp_query never contains the page id for translated pages, despite the translated page just being a regular independent page.
$GLOBALS['wp_the_query'] = new WP_Query(); $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; $GLOBALS['wp_rewrite'] = new WP_Rewrite(); $GLOBALS['wp'] = new WP(); $GLOBALS['wp']->parse_request(''); $GLOBALS['wp']->query_posts(); This code seems to work at getting the page id of original pages, but when the page is a translation it doesn’t work. 🤔</img>
See https://wordpress.org/support/topic/wpml-slug-and-custom-post-types/#post-16390585