Support Forum

Theme Background Disappears on Forum Page [WP Integration]

N N
N
Member

Hello,

I added Simple:Press to my WP.org site, but the theme’s background image disappears on the Forum page no matter which template I use. The background image returns on that page when I disable Simple:Press, so the theme’s template isn’t to blame.

With SP enabled, I inspected a working page (Home) with Firebug, and it says this:

<body class="home customize-support">
<img id="background" style="" alt="img" src="http://mydomain/wp-content/uploads/2013/01/1.jpg" />

Now, when I inspect the Forum page it says this:

<body class=" customize-support">
<img id="background" style="display: none;" alt="img" src="#" />

Any ideas on how I can I fix this problem? The theme’s Javascript (some fancy hover effects on the navigation) also stop working on the Forum page when SP is enabled, if that helps at all.

Thank you,

N

29 Answers

New Answer

MP Mr Papa
Mr Papa
Member

you didnt give us a link, but my guess is you have plugin (or the wp theme) that is doing a custom background on the wp login page…  since the forum includes an inline login form, that other plugin is getting overly greedy and messing up the background on the forum page…

if that is true, a couple options… fix the greedy plugin… or remove the forum inline login form so it doesnt confuse the other plugin or theme…

N N
N
Member

Mr Papa said
you didnt give us a link, but my guess is you have plugin (or the wp theme) that is doing a custom background on the wp login page…  since the forum includes an inline login form, that other plugin is getting overly greedy and messing up the background on the forum page…

if that is true, a couple options… fix the greedy plugin… or remove the forum inline login form so it doesnt confuse the other plugin or theme…

Thank you for the quick reply, Mr Papa. I should have mentioned that I’ve tested this with plugins disabled. How can I remove the inline forum login form? I’m happy to PM you a link to my site if need be :-)

MP Mr Papa
Mr Papa
Member

just remove if from the template file that displays it in your sp theme… in this case, its spHead.php template file… look for template function:

        sp_LoginForm($loginForm);

note, the login button wont work if you remove the inline form, but dont worry about that for quick test… we can change the button to point to the wp login page if successful…

N N
N
Member

Mr Papa said
just remove if from the template file that displays it in your sp theme… in this case, its spHead.php template file… look for template function:

        sp_LoginForm($loginForm);

note, the login button wont work if you remove the inline form, but dont worry about that for quick test… we can change the button to point to the wp login page if successful…

I made the change, but unfortunately the background image still doesn’t display. 

MP Mr Papa
Mr Papa
Member

okay, then not sure why the theme is changing the body class…  the simple press plugin is not changing the body class as we dont apply or remove any body class styles…  but that is an abnormal way of doing a background image too so maybe something else at work – just not sure what it might be…

maybe go to forum – options – content settings and try turning off the popup enlargement option…

or go to forum – integration – page and permalink and turn on the strict wp api option..

N N
N
Member

Oh I see, well I’ve tried the methods suggested but still no joy. Very strange one is this.

MP Mr Papa
Mr Papa
Member

something is physically changing the style to make it not show…  but not sure what…  what about that link?

N N
N
Member

Mr Papa said
something is physically changing the style to make it not show…  but not sure what…  what about that link?

I’ve sent you a PM, thanks again for your time :-)

MP Mr Papa
Mr Papa
Member

odd… the wp theme is doing a couple things that violate the wp standards…  not sure it has any impact but may…

its loading jquery and jquery ui from an external source instead of the using the copies that come with wp…

<script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js?ver=1.5.2′></script>
<script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js?ver=1.8.15′></script>

thats not a good thing to do, especially with those old versions…  jquery 1.5.2 is very old – current version that comes with wp is 1.10.2…   jquery ui isnt as bad but still 1.8.15 vs wp version of 1.10.3…

but those old versions of jquery and jquery ui could be quite unstable and not what wp and other plugins are expecting…  but cant guarantee its the problem either though…

does the wp theme have any options to not load external jquery or jquery ui?  and use the wp versions?

N N
N
Member

Mr Papa said
odd… the wp theme is doing a couple things that violate the wp standards…  not sure it has any impact but may…

its loading jquery and jquery ui from an external source instead of the using the copies that come with wp…

<script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js?ver=1.5.2′></script>
<script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js?ver=1.8.15′></script>

thats not a good thing to do, especially with those old versions…  jquery 1.5.2 is very old – current version that comes with wp is 1.10.2…   jquery ui isnt as bad but still 1.8.15 vs wp version of 1.10.3…

but those old versions of jquery and jquery ui could be quite unstable and not what wp and other plugins are expecting…  but cant guarantee its the problem either though…

does the wp theme have any options to not load external jquery or jquery ui?  and use the wp versions?

That is very interesting… there aren’t any options to do this within the theme options itself, but is it something that can be achieved via the coding without breaking all of the hover animations (etc)?

MP Mr Papa
Mr Papa
Member

unknown…  is this theme quite old?  because that jquery version is?  unless they explicitly used methods in the very old jquery version, it should work with the latest…

we can easily correct the theme to use the wp version and see what happens…  search through the theme files and look for those strings (ie the jquery versions)…  the theme will likely be deregisterig the wp jquery version then registering the external version, then enqueing the jquery (and ui)…  we will just want to remove the first two (deregister and register) and leave the enqueue in place.. that will use the wp version instead…

unfortunately, I do not know if this will help the background image issue but will at worst, fix other issues…

N N
N
Member

Mr Papa said
unknown…  is this theme quite old?  because that jquery version is?  unless they explicitly used methods in the very old jquery version, it should work with the latest…

we can easily correct the theme to use the wp version and see what happens…  search through the theme files and look for those strings (ie the jquery versions)…  the theme will likely be deregisterig the wp jquery version then registering the external version, then enqueing the jquery (and ui)…  we will just want to remove the first two (deregister and register) and leave the enqueue in place.. that will use the wp version instead…

unfortunately, I do not know if this will help the background image issue but will at worst, fix other issues…

The theme has been updated fairly recently – the background and scripts disappear in the front end completely when I remove the deregister/register commands.

I’ve instead opted to point to the latest versions of jQuery, but the original problem still remains (background and scripts not showing on Forum page).

wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', false, '1.9.1');
 wp_register_script('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', 'jquery', '1.10.3');
MP Mr Papa
Mr Papa
Member

as I said, not sure they are related, but you will likely run into other issues…

not sure why the image would disappear with proper ones…  the ones you listed are still wrong… that is an older jquery than what comes with wp…  and picking the same version may not be enough since google apis typically doesn use noconflict either… and when wp updates, like it does in most releases, you will still be out of date…

if you want to send me a temp wp admin account with sp admin caps, I can take a look at some other sp options or theme options and see if they are in conflict or something…

N N
N
Member

Mr Papa said
as I said, not sure they are related, but you will likely run into other issues…

not sure why the image would disappear with proper ones…  the ones you listed are still wrong… that is an older jquery than what comes with wp…  and picking the same version may not be enough since google apis typically doesn use noconflict either… and when wp updates, like it does in most releases, you will still be out of date…

if you want to send me a temp wp admin account with sp admin caps, I can take a look at some other sp options or theme options and see if they are in conflict or something…

Thank you, I’ll create an account and send you over the details in PM :-)