Support » Plugin: Co-Authors Plus » but how can we use it for custom post type

  • good plugin but how can we use it for custom post type. yes it works in default post but i cannot use it for my custom post type

    • This topic was modified 1 year, 2 months ago by ramineros.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I am also facing the same issue. Have you solved the issue? Any solution?

    Thread Starter ramineros

    (@ramineros)

    not yet

    Plugin Support Niels Lange

    (@nielslange)

    Hello @ramineros & @sabbir33 👋

    To use the plugin with your custom post types, you can use the following code snippet:

    // Use CAP plugin with CPT 'your_cpt_slug'.
    add_filter( 'coauthors_count_published_post_types', function( $post_types ) {
       $post_types[] = 'your_cpt_slug';
       return $post_types;
    } );
    add_post_type_support( 'your_cpt_slug', 'author' );

    Once you added that snippet to your site, please ensure to replace your_cpt_slug with the slug of your CPT.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this review.