First of all, you have a syntax error. If your shortcode is stored in the $output
variable, you would need to call echo do_schortcode($output);
.
But, wouldn’t simply the_content();
do the trick? I believe the shortcodes would be processed if you do this.
You can make a new query with WP_Query, and then use the_content()
in the loop.
$args = array(
'post_type' => 'post', // This selects only posts
'post_status' => 'publish' // Only published posts
);
// The Query
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) {
echo '<ul>';
while ( $the_query->have_posts() ) {
$the_query->the_post(); ?>
<li><?php the_content(); ?></li>
<?php }
echo '</ul>';
/* Restore original Post Data */
wp_reset_postdata();
} else {
// no posts found
}