Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Patrik Illy

    (@illycz)

    I found in this on changelog: Bug correction: non public post types and taxonomies are visible in Polylang settings.

    Is there any way to make it work? Without setting to public: true, of course ??

    Thanks for reply

    Plugin Author Chouby

    (@chouby)

    Hi!

    You can do this programmatically by using the relevant filters pll_get_post_types and pll_get_taxonomies

    Thread Starter Patrik Illy

    (@illycz)

    Thank you.
    Is there a reason why they do not appear by default?

    Plugin Author Chouby

    (@chouby)

    Yes. In some cases, showing private custonomies and post types confused users.

    Thread Starter Patrik Illy

    (@illycz)

    OK, This is the code that I use, if someone needed:

    function add_cpt_to_pll( $types ) {
        return array_merge( $types, array( 'post_type_name' => 'post_type_name' ) );
    }
    add_filter( 'pll_get_post_types', 'add_cpt_to_pll', 10, 2 );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Private Custom Post Type and Taxonovy’ is closed to new replies.