frog1944
frog1944

Reputation: 245

WordPress Gallery Displays Code

I inserted a gallery into a post of mine on WordPress but when I view the gallery on the website it comes up like this:

     [gallery size="medium" ids="110,109,108"]

I've made the post go to a certain page of the website in the code:

    <?php
     $post_id = 5;
     $queried_post = get_post($post_id);
     echo $queried_post->post_content; 
     ?>

could this affect it?Why does this happen? How can I fix this? (I've also discovered for any shortcodes it does the same thing) Thanks

Upvotes: 2

Views: 54

Answers (1)

Kausha Mehta
Kausha Mehta

Reputation: 2928

For that you can use the Wordpress Loop as they are in default or another way is you have to use like add_filter('the_content', $queried_post->post_content);. Thanks!

Upvotes: 1

Related Questions