However (now here is the sad part), s2member slows my site down very much. I could save some loading by using w3totalcache and jQuery lazy load. You can see it for yourself on http://dazugelernt.de
Here's my question / idea:
Since the Homepage is the most important page for any user to see, it should load very quickly. Also, since the user does not yet have to be logged in, the loading of any s2member scripts is obsolete then. When I am not yet linking to any protected content on my site, this should not be a problem.
How can I exclude s2member from being loaded into the <head> when a user is not logged in? I know it should work like this (probably I've made some mistakes there):
- Code: Select all
<?php
if ( array (is_front_page(), is_user_logged_in() ) ) {
insert s2member in the header
} else {
do nothing
}
?>
Can you help me put this to work?
Cheers,
Alex from Germany