• Resolved nilssondigital

    (@nilssondigital)


    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

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting the shortcode from a post query’ is closed to new replies.