polylang : Custom post types don’t show plugin Timeline Express
-
To make your plugin translatable with polylang, you need to add the pll_get_post_types filter in the theme’s functions.php file.
see https://polylang.pro/doc/filter-reference/#pll_get_post_types
So I added the following filter to my theme’s functions.php but I still do not see the checkbox in polylang> settings> custom post types and taxonomy so i can not activate it
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 ‘my_cpt’ from the list of custom post types in Polylang settings
unset( $post_types[‘my_cpt’] );
} else {
// enables language and translation management for ‘my_cpt’
$post_types[‘my_cpt’] = ‘my_cpt’;
}
return $post_types;
}What is the problem ?
Can you help me ?Access to the site in private
- The topic ‘polylang : Custom post types don’t show plugin Timeline Express’ is closed to new replies.