Title: Missing styles when calling through PHP
Last modified: October 26, 2023

---

# Missing styles when calling through PHP

 *  Resolved [natewhidden](https://wordpress.org/support/users/natewhidden-1/)
 * (@natewhidden-1)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/missing-styles-when-calling-through-php/)
 * This plugin is fantastic. It works great on posts when I call it, but I’m trying
   to use it within a php script, so when we create pages for customers, a form 
   can autopopulate the tag that feeds this.
 * It pulls the content properly, but the styling gets stripped out when i call 
   via php. Is there a workaround I could do? Here is the code:
 *     ```wp-block-code
       <?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"]');
   
       	?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/missing-styles-when-calling-through-php/#post-17153371)
 * Hi,
   I understand. There is a new hook that can be used for this scenario `lps/
   load_assets_on_page`, it would require that in the script you could set the assets
   to load on this page (use the filter and return true for the pages that you want).
   Otherwise, you could use the new option from here, which is available in the 
   settings-> reading screen (always load the LPS assets).[https://imgur.com/a/y7nQSss](https://imgur.com/a/y7nQSss)
   Let me know if this works for you.Regards,Iulia
    -  This reply was modified 2 years, 7 months ago by [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/).
 *  Thread Starter [natewhidden](https://wordpress.org/support/users/natewhidden-1/)
 * (@natewhidden-1)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/missing-styles-when-calling-through-php/#post-17153515)
 * that worked! thank you SO MUCH for the prompt reply. What a fantastic plugin 
   BTW
    -  This reply was modified 2 years, 7 months ago by [natewhidden](https://wordpress.org/support/users/natewhidden-1/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Missing styles when calling through PHP’ is closed to new replies.

 * ![](https://ps.w.org/latest-post-shortcode/assets/icon-128x128.gif?rev=2355649)
 * [Latest Post Shortcode](https://wordpress.org/plugins/latest-post-shortcode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/latest-post-shortcode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/latest-post-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/latest-post-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/latest-post-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/latest-post-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [natewhidden](https://wordpress.org/support/users/natewhidden-1/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/missing-styles-when-calling-through-php/#post-17153515)
 * Status: resolved