WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » Display a count of total product published

Display a count of total product published

Viewing 3 replies - 1 through 3 (of 3 total)
  • Roy Ho

    @splashingpixelscom

    Not tested…just off the top of my head.

    $args = array( 'post_type' => 'product', 'post_status' => 'publish', 'posts_per_page' => -1 );
    
    $products = new WP_Query( $args );
    
    echo $products->found_posts;

    WORKS fine!!! ty so much man!!!

    Hi SplashingPixels,
    u can help me to solve this problem?

    “i wanna display in the profile of every author (subscriber) a list of all products (woocommerce) uploaded by author with a title + permalink‚Ķ u can help me in this? TY so much in advance‚Ķ good day!”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display a count of total product published’ is closed to new replies.
Skip to toolbar