Polylang with Popups – WordPress Popup
-
Hi,
I want to show #popup1 only in french for exemple and #popup2 only in english.
I had this in functions.php
add_filter( ‘pll_get_post_types’, ‘add_cpt_to_pll’, 10, 2 );function add_cpt_to_pll( $post_types, $is_settings ) {
if ( $is_settings ) {
// hides ‘popups’ from the list of custom post types in Polylang settings
unset( $post_types[‘spucpt’] );
} else {
// enables language and translation management for ‘popups’
$post_types[‘spucpt’] = ‘spucpt’;
}
return $post_types;
}I have the flags in my custom post types but on the website all the popups are showing (french and english) in the same time.
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Polylang with Popups – WordPress Popup’ is closed to new replies.