• Resolved mica3006

    (@mica2006)


    Hello @wpkube, your plugin is awesome, thank you very much !!

    I have one request, i use cptui, so i have make a custom post type.

    How can i display the number of custom post with your plugin ?

    I m newbie and not developper … but maybe you can help me..

    function nbrPostByUser( $userid, $post_type = ['car'] )

    Thanks

    • This topic was modified 4 years, 11 months ago by mica3006.
    • This topic was modified 4 years, 11 months ago by mica3006.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mica3006

    (@mica2006)

    I think i need modified your code here, right ? :

    // post types
    
            if ( ! empty( $settings['post_types'] ) ) {
    
                $atts['has_published_posts'] = explode( ',', $settings['post_types'] );
    
                unset( $atts['who'] );
    
                $settings['skip_empty'] = 'no';
    
            }
    Thread Starter mica3006

    (@mica2006)

    Fixed !

    I have change the default value :

    'post_types' => 'car',

    Work perfectly !

    Thanks again for your plugin.

    • This reply was modified 4 years, 11 months ago by mica3006.
    Thread Starter mica3006

    (@mica2006)

    Maybe used a snippet ? for your next update dont brake my customization…

    Plugin Author WPKube

    (@wpkube)

    Hi @mica2006

    You can use “post_types” parameter for the shortcode. Here’s an example:

    [authors_list post_types="car"]

    Thread Starter mica3006

    (@mica2006)

    Prefect, thank you !

    Plugin Author WPKube

    (@wpkube)

    You’re welcome.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom post type’ is closed to new replies.