Tagged: x
-
AuthorPosts
-
April 26, 2016 at 10:47 pm #901377
germanpulseParticipantI applied a custom css class (feature) to a post using the “Body CSS Class(es)” field in the edit post screen. I then proceeded to modify the css in my child theme using .feature before each piece I was editing. Everything worked like a charm… the post looks the way I want it to.
The Problem:
When I click on one of the post’s tags or category link, the archive page that is loaded is adding the custom css class to that page as well. When I look at the css of the archive page, I see the .feature class in the body tag. The entire body tag is as follows:body.archive.tag.tag-beer.tag-71.logged-in.admin-bar.x-integrity.x-integrity-light.x-navbar-fixed-top-active.x-full-width-layout-active.x-content-sidebar-active.x-masonry-active.x-archive-masonry-active.feature.x-v4_4_2.x-child-theme-active.cornerstone-v1_2_4.customize-support
Is this normal behavior for the theme? If so, is there a modification I can make that disables this effect?
NOTE: I am working on the site in a local environment, so it is NOT possible to provide login access. I am willing to post any code (including full pages) to help troubleshoot if needed.
April 27, 2016 at 8:57 am #902195
JoaoModeratorHi There,
Try applying the same css you did but use the post ID instead of the Body Class or maybe both combined.
Like
.post-id-5514
I Hope that helps if not please provide us the css code you used and any other information you judge useful.
Thanks,
Joao
April 27, 2016 at 7:05 pm #903234
germanpulseParticipantSo creating the css per post id works, though it had to be formatted as .postid-9229 and not .post-id-9229
Is the problem I was experiencing a bug or is that how X is supposed to work? If it is working as it should, could you explain why the “Body CSS Class(es)” field is present? Why would one use that over calling out a specific post id?
April 28, 2016 at 7:47 am #904009
ZeshanMemberHi there,
Thanks for writing back!
This seems a bug to me. The body class added to the post should not appear on other pages. I will pass this to our developers to investigate the issue in detail. In the meantime, you can utilize the single post page unique body class to style it.
Thank you!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-901377 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
