Polylang support not working
-
The popups are not translatable. If I make them translatable with adding the following script to functions.php, still popups in all languages appear at the same time (under each language).
// PopUp CPT translataple
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;
}
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Polylang support not working’ is closed to new replies.