Shortcode styling not working when called through PHP

[ad_1]

Im using PHP to call a shortcode, and populate a tag value. Its working great on posts, and is pulling in the proper data, but the styling is getting pulled out when using this within PHP.

Here is the shortcode im using:

[latest-selected-content ver=”2″ limit=”24″ perpage=”3″ showpages=”more” loadtext=”Load More” pagespos=”1″ display=”title” titletag=”h4″ url=”yes” image=”full” elements=”25″ size_title=”20px” image_ratio=”16/9″ css=”three-columns has-shadow hover-highlight content-center” type=”post” status=”publish” tag=”cohere-health” orderby=”dateD” show_extra=”light_spinner”]

Here is the PHP code im using to call this:

<?php
$value = get_post_meta(get_the_ID(), ‘insighttag’, true);
echo do_shortcode(‘[latest-selected-content ver=”2″ limit=”24″ perpage=”3″ showpages=”more” loadtext=”Load More” pagespos=”1″ display=”title” titletag=”h4″ url=”yes” image=”full” elements=”25″ size_title=”20px” image_ratio=”16/9″ css=”three-columns has-shadow hover-highlight content-center” type=”post” status=”publish” tag=”‘. $value . ‘” orderby=”dateD” show_extra=”light_spinner”]’);
?>

I’m using PHP to call a shortcode, and populate a tag value. Its working great on posts, and is pulling in the proper data, but the styling is getting pulled out when using this within PHP.

&#x200B;

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer