Title: Loading NgSurvey styles and scripts when using do_shortcode?
Last modified: July 28, 2021

---

# Loading NgSurvey styles and scripts when using do_shortcode?

 *  Resolved [datschge](https://wordpress.org/support/users/datschge/)
 * (@datschge)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/loading-ngsurvey-styles-and-scripts-when-using-do_shortcode/)
 * Hello,
 * we don’t put the `[ngsurvey id="123"]` shortcode in the page content but call
   it using `do_shortcode()`. The current (version 1.0.5) result is that NgSurvey’s
   styles and scripts are not enqueued for inclusion in the page header. Can that
   be enforced programmatically? Or does this need fixing in the plugin? Thanks!

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

 *  Plugin Author [NgIdeas](https://wordpress.org/support/users/ngideas/)
 * (@ngideas)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/loading-ngsurvey-styles-and-scripts-when-using-do_shortcode/#post-14711874)
 * To avoid the styles loaded on pages other than surveys, ngsurvey strictly checks
   the post type or the shortcode availability. So you cannot render styles by doing
   do_shortcode from a custom plugin.
 * To help you overcome this problem, I am adding a new filter “ngsurvey_render_styles”
   and “ngsurvey_render_scripts” which can be used to hint the plugin to load them
   forcibly. Should be available in 1.0.6.
 *  Thread Starter [datschge](https://wordpress.org/support/users/datschge/)
 * (@datschge)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/loading-ngsurvey-styles-and-scripts-when-using-do_shortcode/#post-14711884)
 * Thank you, looking forward to the new version then!

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

The topic ‘Loading NgSurvey styles and scripts when using do_shortcode?’ is closed
to new replies.

 * ![](https://ps.w.org/ngsurvey/assets/icon-128x128.png?rev=2546701)
 * [NgSurvey - Powerful, feature rich self-hosted surveys](https://wordpress.org/plugins/ngsurvey/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ngsurvey/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ngsurvey/)
 * [Active Topics](https://wordpress.org/support/plugin/ngsurvey/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ngsurvey/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ngsurvey/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [datschge](https://wordpress.org/support/users/datschge/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/loading-ngsurvey-styles-and-scripts-when-using-do_shortcode/#post-14711884)
 * Status: resolved