Convert WordPress shortcodes into plain html

I am building a static landing page on wordpress root folder, and I need to import some shortcodes from an existing page located in wp-content.

What I do is import with $post = get_post($post_id) the post containing my shortcode, then I extract it ->

$output = apply_filters( ‘the_content’, $post->post_content );

Finally i do ->

echo do_shortcode(“$output”);

The issue here is that on the page I got displayed only the raw format of the shortcode, like [shortcode];

There is a way to convert shortcodes into plain html so my page can display it correctly or i am missing some require/include somewhere?
I already added define( ‘WP_USE_THEMES’, false ); require “wp-load.php”;

Read more here:: Convert WordPress shortcodes into plain html

Leave a Reply

Your email address will not be published. Required fields are marked *