I'm trying to implement a slider in my Wordpress post. For this I'm using Meta Slider
plugin. When I've added a slider, I should be able to use the shortcode in my posts ([metaslider id=21]
). If I add this to one of my post, it shows up the same way on the live page. I don't see any slider, there is just a string "[metaslider id=21]" on my page.
I checked that wp_footer();
is implemented right before the body
tag is ending and that the footer is implemented in every php file.
I get the post content using this way:
$args = array('posts_per_page' => 5, 'tag' => get_the_title());
$wp_query = new WP_Query( $args );
$posts = $wp_query->get_posts();
foreach($posts as $post){
$id = $post->ID;
$content = get_post($id);
echo $content->post_content;
}
It gets the content perfectly but it's not loading the slider.
Can someone please tell me the reason why?