Sign In

More Information

include plugin JS, CSS in wp_head only when needed?

Feedback, Suggestions, Bug reports about WordPress Double Opt-In List Management Plugin from G-Lock Software. You have to register to post.

include plugin JS, CSS in wp_head only when needed?

Postby appleholic » Fri Jun 25, 2010 9:56 am

Dear all,

I am trying to find a clean method of minimizing bandwidth without tampering with the plugin-files, maybe someone can help me. Here's my "problem":
Once the opt-in plugin is enabled, it loads the glock2.min.js as well as the gsom.css on every page. It seems as if the plugin does not distinguish between it actually being used or not, resulting in unnecessary files being loaded when calling wp_head() from the template. Has anyone got a clue on how to get around this? Surely, one method would be to alter the code: if(page_id(xy)) { include js + css } but that's nasty.

best regards,
David
appleholic
Newbie
Newbie
 
Posts: 2
Joined: Fri Jun 25, 2010 9:44 am

Re: include plugin JS, CSS in wp_head only when needed?

Postby marisp » Fri Jun 25, 2010 1:27 pm

Hi David,

We uploaded the new 2.4.7 version of the plugin. We fixed the issue with the glock2.min.js and the gsom.css files in this version. Please, update to the latest version and see how it works.
P.S Click on this link to get your hands on
Ultimate Email Marketing Guide if you don't have it yet
marisp
Site Admin
Site Admin
 
Posts: 3125
Joined: Mon Feb 25, 2002 4:11 pm

Re: include plugin JS, CSS in wp_head only when needed?

Postby appleholic » Fri Jun 25, 2010 3:08 pm

Dear marisp,
many thanks for your quick response. I can see that you moved the script-reference away from the header... at least in my case it is now referenced only on the actual page containing the form. This is great and allready brings a speed increase. The CSS however is still referenced in the header but I guess it has to be that way so that the browser can correctly implement the stylesheet, right?
appleholic
Newbie
Newbie
 
Posts: 2
Joined: Fri Jun 25, 2010 9:44 am



Return to WordPress Double Opt-In List Management Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

 

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 437 on Tue Jan 25, 2005 6:23 am

Users browsing this forum: No registered users and 2 guests

Current time

It is currently Fri Sep 03, 2010 11:05 am