• Resolved Soumya Roy

    (@soumyaroyy)


    Hello

    I have generate a shortcode but the post is in draft .. and I user do_shortcode(); function to echo the shortcode in the template file. is there any option to hide the product table if the shortcode post is unpublish? if I publish the shortcode then the product table will show.

    Please suggest
    Thank You

Viewing 2 replies - 1 through 2 (of 2 total)
  • autocircle

    (@autocircle)

    Create a support ticket at https://codeastrology.com/support

    Plugin Author Saiful Islam

    (@codersaiful)

    Our product table, Already show Only published product.
    Check in shortcode.php file inside “includes” folter.
    In Query, following args available:

    $args = array(
            'posts_per_page' => $posts_per_page,
            'post_type' => array('product'), //, 'product_variation','product'
            'post_status'   =>  'publish',
            'meta_query' => array(),
        );

    Thanks a lot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide unpublish Shortcode’ is closed to new replies.