Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #901377
    germanpulse
    Participant

    I 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.

    #902195
    Joao
    Moderator

    Hi 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

    #903234
    germanpulse
    Participant

    So 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?

    #904009
    Zeshan
    Member

    Hi 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!

  • <script> jQuery(function($){ $("#no-reply-901377 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>