Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Want to switch off navigation on a particular post (http://forum.bytesforall.com/showthread.php?t=23176)

Jerry_Q4d May 3, 2015 03:19 AM

[SOLVED] Want to switch off navigation on a particular post
 
Dear people! I have a strange problem with CSS. Id like to style a particular post in a different way: I want to switch off kicker, navigation etc. Its post number 54967, so currently I have this in my CSS inserts:

#post-54967 .navigation-top {
display: none;
}
#post-54967 .post-kicker {
display: none;
}
#post-54967 .post-footer {
display: none;
}

Kicker and footer go away without problems, but the navigation stays in place. What am I doing wrong?

juggledad May 3, 2015 08:46 AM

use your code inspector or view the page and then look at the source.
Now find the navagation and list all it's elements up to the body and their ID's and classes.
Next examine your css selector and see if it will work.

Jerry_Q4d May 4, 2015 10:48 AM

the humble scholar is back with the solution... I like juggledads method very much - he guides you to the right answer, often by asking questions himself. thats very philosophical. Its also less work this way :)

To keep it short, you need this:

.postid-54967 .navigation-top {
display: none;
}
#post-54967 .post-kicker {
display: none;
}
#post-54967 .post-footer {
display: none;
}

You notice that the selector in the first case (the navigation) is different. the reason is - and juggledad knew it of course - that the navigation is not part of the post (#postnumber) and therefore you cant address it with the post id AT ALL.
however, you can adress the body.single (the body on a single post) and switch of navigation if its class is your postnumber.
phew


All times are GMT -6. The time now is 01:51 AM.

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