Page 1 of 1

Removing the default CSS

PostPosted: January 2nd, 2012, 12:43 am
by Stephem
I'm trying to remove the default CSS s2Member produces from the head:

Code: Select all

<link rel="stylesheet" id="ws-plugin--s2member-css" href="http://site.com/spa/wp-content/plugins/s2member/s2member-o.php?ws_plugin__s2member_css=1&#038;qcABC=1&#038;ver=111220-111220-1212004154" type="text/css" media="all" />



I searched these forums and found a solution but it simply isn't working.

How can I prevent s2Member Pro from loading it's default CSS?

You can create this directory and file: /wp-content/mu-plugins/s2-hacks.php

Code: Select all

<?php
add_action ("ws_plugin__s2member_after_loaded", "remove_s2_pro_css");
function remove_s2_pro_css ()
    {
        remove_action ("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_css_js::css");
    }
?>




Any idea's as to why it's not being removed?

Re: Removing the default CSS

PostPosted: January 3rd, 2012, 5:54 am
by Cristián Lávaque
Did you try clearing the cache?

Re: Removing the default CSS

PostPosted: January 7th, 2012, 1:07 pm
by thelastminute
I'm also having this same issue.

I have cleared all the caches as well.

Any thoughts?

Re: Removing the default CSS

PostPosted: January 7th, 2012, 6:55 pm
by Stephem
thelastminute wrote:I'm also having this same issue.

I have cleared all the caches as well.

Any thoughts?


Add this to your functions.php file:

Code: Select all

add_action( 'wp_print_styles', 'my_deregister_styles', 100 );

function my_deregister_styles() {
   wp_deregister_style('ws-plugin--s2member');
}

remove_action("ws_plugin__s2member_during_css", "c_ws_plugin__s2member_pro_css_js::css");

add_filter("ws_plugin__s2member_login_header_styles", "__return_false");



I'm not sure if all that is needed but it works.