Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Only load estore CSS/JS files when detecting shortcodes in posts, possible?

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Only load estore CSS/JS files when detecting shortcodes in posts, possible?

Tagged: js loading, page speed

  • This topic has 2 replies, 2 voices, and was last updated 13 years, 11 months ago by mfgmk.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 27, 2011 at 10:06 pm #3668
    mfgmk
    Member

    Hey there – I can’t believe how far this plugin has come along and polished it is now! I do have a question though and that is, can we disable loading all of WP estore’s files (css/js… ie. wp_eStore_style.css, wp_eStore_custom_style.css, jquery.external.lib.js and jquery.lightbox-0.5.pack.js) when the post does not include any shortcodes/when we’re not selling anything? I’m trying to cut down on the page size to speed up loading times and with WP estore loading those file automatically on a Multisite installation, some of my sites/pages don’t need to have these files called. If there’s no method to detect whether a shortcode is being used in post, would there be any chance to build in some functionality where we can manually choose to load those files for each product/post? Maybe via a custom field value or something (true/false)?

    June 28, 2011 at 1:04 am #33741
    amin007
    Participant

    I understand what you are trying to do but there is a better way to do this which is a standard practice.

    You can use a plugin that combines all the javascript files on the page and loads that one file (this way instead of loading 10 different files you are loading 1 file that has the content of those 10 files). The same goes for CSS. Plugins like WP Minify, W3 Total Cache will allow you to do these things.

    July 13, 2011 at 4:00 am #33742
    mfgmk
    Member

    Ah yeah, I’ve already got those two running. I was just trying to make the page size smaller by excluding those calls on pages/posts that don’t need it, but it’s cool. Love the plugin =)

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ