Use WP_Query for custom post type but result get empty
You can write like $args = array( ‘posts_per_page’ => 10, // -1 to fetch all posts ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘post_type’ => ‘at-subscription’, // the post type ‘post_status’ => ‘publish’, ‘suppress_filters’ => true ); $posts_array = get_posts( $args ); // For displaying all posts related to at-subscription print_r( $posts_array ); Hope this will … Read more