Title: Loading js/css only when shortcode present
Last modified: October 16, 2021

---

# Loading js/css only when shortcode present

 *  Resolved [grzechus](https://wordpress.org/support/users/grzechus/)
 * (@grzechus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/loading-js-css-only-when-shortcode-present/)
 * Hello, is it possible to force loading plugin files (js/css) only when there 
   is a shortcode on the post/page?

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

 *  Plugin Author [pantherius](https://wordpress.org/support/users/pantherius/)
 * (@pantherius)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/loading-js-css-only-when-shortcode-present/#post-14986007)
 * Hi,
 * Just updated the plugin and added a feature to include or exclude the plugin 
   files on specified pages/posts only.
    Unfortunately, it is not possible to implement
   the plugin files when a shortcode is exists as the files added technically before
   the shortcodes can be checked.
 * Best regards,
    Pantherius
 *  Thread Starter [grzechus](https://wordpress.org/support/users/grzechus/)
 * (@grzechus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/loading-js-css-only-when-shortcode-present/#post-14986454)
 * Hi,
 * I have a blank page in settings.
 * I use AssetCleanup Pro to unload the plugin on all my pages and archives and 
   it works fine. I just need to unload it on posts where I don’t use chart.js as
   well.
 * Thanks.
 *  Plugin Author [pantherius](https://wordpress.org/support/users/pantherius/)
 * (@pantherius)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/loading-js-css-only-when-shortcode-present/#post-15073000)
 * Hi,
 * Just fixed the issue, please check it again.
 * Regards,
    Pantherius

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

The topic ‘Loading js/css only when shortcode present’ is closed to new replies.

 * ![](https://ps.w.org/wp-charts-and-graphs/assets/icon-256x256.jpg?rev=1937146)
 * [WP Charts and Graphs - WordPress Chart Plugin](https://wordpress.org/plugins/wp-charts-and-graphs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-charts-and-graphs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-charts-and-graphs/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-charts-and-graphs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-charts-and-graphs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-charts-and-graphs/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [pantherius](https://wordpress.org/support/users/pantherius/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/loading-js-css-only-when-shortcode-present/#post-15073000)
 * Status: resolved