Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] CSS Selector toChange Body Background Image on all Single Posts in a certain (http://forum.bytesforall.com/showthread.php?t=22301)

New WordPress Fan Apr 25, 2014 07:12 PM

[SOLVED] CSS Selector toChange Body Background Image on all Single Posts in a certain
 
What CSS selector will work to change the body background image for all single posts in a certain category, using Wordpress 3.9 and Atahualpa 3.7.15?

The CSS solution provided in this thread: http://forum.bytesforall.com/showthread.php?t=20610

worked fine with Wordpress 3.5.2 and Atahualpa 3.7.12. Where the category name was "instructional videos," the following CSS code worked perfectly in those older versions of Wordpress & Atahualpa:

Code:

body.single.instructional-videos {
background-image: url("http://xxxx.jpg");
}

However, this does not work now with the newer versions of WP and Atahualpa referenced above.

After viewing the page source, I also tried:

Code:

body.single.category-instructional-videos {
background-image: url("http://xxxx.jpg");
}

But this also does not work.

"div.category-instructional videos" does work as a selector to change the background image of the post itself, but not the full body background.

Can't seem to find the correct CSS selector now to do what body.single.[category-name] did perfectly in the older versions of WP and Atahualpa referenced above.

Any help will be greatly appreciated!

lmilesw Apr 25, 2014 09:18 PM

The way to figure that out is to use a tool like the Firebug addon for Firefox.

New WordPress Fan Apr 27, 2014 11:44 AM

Thank you, but I haven't yet learned to use Firebug. Will try to learn when I have a chance.

I was hoping that maybe someone may already have figured out what css selector will style the body background for all single posts in a certain category in Atahualpa 3.7.15 with Wordpress 3.9. I would think that this would not be site-specific; there should be a "generic" css selector for this that would work on all sites using these latest versions of Atahualpa and Wordpress. Yes?

The code I quoted above did work with the earlier versions of Atahualpa and WP mentioned above, but not now.

Would really appreciate help in this -- which may help others too!

Many thanks!

juggledad Apr 27, 2014 12:50 PM

What is the URL of your site? Point to a single post page

Did you add the code you found in that other post back into the functions.php?

New WordPress Fan Apr 28, 2014 12:08 PM

Hi Juggledad, Thank you for your reply. I just sent you a PM with the URL.

I added in ATO > CSS Inserts (not in the functions php) the CSS code that you helped me find for this purpose before - in the prior discussion thread (in July of 2013). That CSS code (placed in CSS Inserts) worked before - in the older versions of WP and Atahualpa mentioned above - but no longer works with the current versions of WP and Atahualpa.

Many thanks for your help!

juggledad Apr 28, 2014 02:01 PM

The CSS won't work without the code added to function.php

New WordPress Fan Apr 28, 2014 03:38 PM

What code should be added to functions.php and where?

(Sorry, but I am not a Pro and do not know PHP code, but I if someone gives me the exact code to insert and tells me exactly where, I can do that. :) )

juggledad Apr 28, 2014 03:48 PM

The code you found and put in the other thread (looks like someone didn't document his changes to the theme code too well)

New WordPress Fan Apr 28, 2014 04:15 PM

Thank you very much, Juggledad! That worked!

Sorry, I was a little too quick, and forgot to read the part in our prior thread at: http://forum.bytesforall.com/showthread.php?t=20610 about adding the php code. When I added that same php code in the Theme Functions php where you said before, the CSS selector now works.

Mea Culpa! Next time, I'll read the prior threads more carefully before posting in the forum! Thanks for your patience! :)

And, thanks again for the GREAT Help!


All times are GMT -6. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.