Reputation: 245
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
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