Getting the shortcode from a post query

[ad_1]

Hi,

I’m trying to set up a custom page that uses the wordpress loop to query the dflip post type, so that I can have a page that just lists all the ebooks as they’re added to the site.

Query is simple and looks like this

<?php 

            // The Query

            $args = array('post_type' => 'dflip',
                          'posts_per_page' => '1000',
                         );

            $the_query = new WP_Query($args);

            if ( $the_query->have_posts() ) :  
               while ( $the_query->have_posts() ) : $the_query->the_post();  ?>
				
				<div class="item ebook">
                                 <div class="shortcode">
                                    <?php do_shortcode(''); ?>
                                 </div>
                                </div>

I’m just trying to figure out how I can grab the shortcode here?

Is that possible?

No need to modify the code or anything it’s just there to explainwhat I want to do, I just don’t know how to get the shortcode.

Thanks,

Chad

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer