Support Forum
Hey @Scott,
I was having the same problem as you. Using S2Member and Simple:Press caused my background to disappear when NOT logged in. After login, everything displayed fine.
Here is the FIX! (tried and verified - http://www.keepourforestopen.org/forum/ )
Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
then add:
<?php
add_filter ("ws_plugin__s2member_login_header_styles", "__return_false");
?>
That's it!
This will disable the CSS that S2Member applies to the login page (that loads in the header). The side effect is that if you have a styled login (at /wp-login.php) it will revert to the standard WP login.
Since I've got S2M Pro, I just use the login widget on a page, so this doesn't bother me.
Cheers,
Marcos
ah, so a greedy filter on the login... catching the login form that we have inline...
nice job figuring it out!
just to clarify, you could put that code into your wp theme functions.php or your sp theme functions.php...
and if you only want to do it on the forum page, you might try something like:
add_filter ('ws_plugin__s2member_login_header_styles', 'my_skip_login'); function my_skip_login($data) { if (sp_is_forumpage()) return false; return $data; }
Visit Cruise Talk Central and Mr Papa's World
I'm totally not an experienced user, but waded through tons of forum posts to extract that info (thought I'd share the result!)... whew!
@ Mr. Papa...do those files get over written if there is an update to the theme? I thought the reason to put it in the must use plugins folder was to keep it from getting updated? I'm learning here...
Also, I tried the code above and it did correct the background issue on the forum page and I did get the styled login, but it's missing the logo (better of the 2-rather no logo than wp logo).
Any idea how to get that back?
keepourforestopen.org (click Log Me In) and it fowards you to the login - since your credentials were wrong...so you can see what I mean.
Thanks so much!
which files?
the wp theme could get overriden if it can be upgraded from within the wp admin...
if you do as we recommend and make your own sp theme from one of ours (http://codex.simple-press.com/.....g-a-theme/), then it will not get overwritten...
Since its really a sp driven change, I would probably put it there... and actually, you might be able to put just the code you had in the sp theme functions.php since it wont be loaded on non forum pages anyways...
Visit Cruise Talk Central and Mr Papa's World
I will be making my own sp theme.
I removed the other code from s2-hacks.php
Then, I put your code in the "Default Theme's" spFunctions.php
I get the same results. It does fix the background issue. Forum page loads flawlessly. However, it's still affecting the wordpress login page (@ http://keepourforestopen.org/w.....-login.php )
It should have a logo above the "login box" but it's now blank.
Any Ideas?
Thanks so much!
(PS - I have another issue concerning the login button in the forum - close to figuring it out but could use some help...Should I create a new topic?)
oh yeah, lol, meant to answer that too...
so I guessed at the arguments to the filter... is there really only one argument? I would need to see if there are more arguments for the ws_plugin__s2member_login_header_styles... I just returned the passed in value... something might need to be done with it..
but cannot tell without seeing the code that applies the filter...
Visit Cruise Talk Central and Mr Papa's World
There are 5 instances where that phrase is found in the file /login-customizations.inc.php
/**/ $a[] = '<style type="text/css">'; /* Open style tag, then give Filters a chance below. */ $i = apply_filters("ws_plugin__s2member_login_header_styles_important", " !important", get_defined_vars()); $a = apply_filters("ws_plugin__s2member_login_header_styles_array_after_open", $a, get_defined_vars()); /**/
/**/ $a = apply_filters("ws_plugin__s2member_login_header_styles_array_before_close", $a, get_defined_vars()); $a[] = '</style>'; /* Now close style tag. There are other Filters below. */ /**/
/**/ $a = apply_filters("ws_plugin__s2member_login_header_styles_array", $a, get_defined_vars()); $s .= "\n".implode("\n", $a)."\n\n"; /* Now put all array elements together. */ /**/ echo apply_filters("ws_plugin__s2member_login_header_styles", $s, get_defined_vars()); /**/ do_action("ws_plugin__s2member_after_login_header_styles", get_defined_vars()); /**/
I hope this will help figure it out! Thanks so much! 🙂
so what do you have in the sp functions.php file? exactly as in post #4? and you removed the hacks file?
Visit Cruise Talk Central and Mr Papa's World
I added this to my spFunctions.php
# remove S2Members login CSS from forum add_filter ('ws_plugin__s2member_login_header_styles', 'my_skip_login'); function my_skip_login($data) { if (sp_is_forumpage()) return false; return $data; }
and yes, I removed all code from s2-hacks.php
Thank You!
well, there is only one line in your list that applies and that is the second from the end...
but a little confused as to what might be going on.... its actually passing two vars and we are only accepting one, but that should be fine... if the 'IF' statement evaluates false, it should return the passed in value which should have no effect...
so what happens if you remove the entire IF statement and just let it return the original data?
if that is still wrong, then try commenting out the add_filter() line in my code and see what happens...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)