diff --git a/public/class-library.php b/public/class-library.php index 1e02eb1..8f0115e 100755 --- a/public/class-library.php +++ b/public/class-library.php @@ -126,19 +126,14 @@ public function shortcode( $atts ) { 'post_type' => 'library_term', ); - $query = new WP_Query( $args ); + $posts = get_posts( $args ); $output = ''; - if ( $query->have_posts() ) { - while ( $query->have_posts() ) { - $query->the_post(); - $output = get_the_content(); - } + foreach ( $posts as $post ) { + $output = $post->post_content; } - wp_reset_postdata(); - return $output; }