Custom post type not recognized
-
I added this code to my theme fuctions.php
add_filter(‘pll_get_post_types’, ‘add_cpt_to_pll’, 10, 2);
function add_cpt_to_pll($post_types, $hide) {
if ($hide)
// 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’] = ‘udt_homepage_slider’;
return $post_types;
}?>because by default the plugin loads only Portfolio custom type post but the Polylang options are not visibile in the slider posts admin pages
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom post type not recognized’ is closed to new replies.