Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom CSS not being recognised


  • Center11Forward
    Participant

    @center11forward

    Hey, hopefully this is a simple fix.

    I have identified a simple change I want to make to BBpress CSS:

    div.bbp-breadcrumb {
    float: left;
    display:none;
    }

    I have disabled breadcrumbs globally on my site and also on the individual forum page but that did not work, so I went to try and change the BBpress CSS to achieve what I wanted.

    Using any browsers inspect element feature, I can go into the CSS, enter the above alteration and it does exactly what I want…. herein lies the problem. I am using a custom theme (Jupiter) and general bbpress functionality is fine. However, entering the above CSS alteration into the themes stylesheets does nothing. So I tried to go a little further and I went directly to the BBpress CSS file and made the above alteration and saved…

    Here is the strange thing, the BBpress CSS file has been altered correctly (I downloaded it to my desktop to confirm) but for some reason, the change is not being reflected on the forums on my site – When I inspect element, the alteration to the breadcrumbs is not being recognised and its as if it is continuing to load an old version of the CSS file. I have used various browsers, deleted my cache etc but nothing seems to work…

    Any ideas?

Viewing 1 replies (of 1 total)

  • niuserre
    Participant

    @niuserre

    It is best not to make changes to the bbPress core files because they will be lost when you update. The same for your theme files unless it’s already a custom theme. The best way is with a Child Theme.

    In your theme folder (or preferably, child theme), create a subfolder called css with a file called bbpress.css so you have /wp-content/themes/%your-theme%/css/bbpress.css

    The last rule defined overrides any previous, conflicting rules so this file will make your styles the last rules. See if it works then and if it still doesn’t then check for what is overwriting it – because something is.

    (Specificity is usually the reason why your CSS doesn’t work the way you think it should. If there are styles in your code that are more specific, they will win. There is a good article on specificity at Smashing Mag.)

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.