Home Forums WoodMart support forum Issue with Custom CSS Not Overriding Default Theme Styles

Issue with Custom CSS Not Overriding Default Theme Styles

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #644890

    Sajid Hadi
    Participant

    Hi,

    I’m facing an issue with the custom CSS on my WordPress site using the Woodmart theme. I add my custom CSS through the theme’s custom CSS section, but on the first page load, some styles aren’t applied as expected because the default theme CSS is overriding my custom rules. Only after refreshing the page do my custom styles take effect.

    For example, after I update or add new CSS rules and save them, I have to visit each page at least once so that the default CSS loads first, and then my custom CSS is applied on a reload. This means that until I manually refresh or navigate each page, all visitors will initially see the default theme CSS instead of my updated styles.

    I would appreciate any assistance to ensure that my custom CSS updates are applied immediately on the first load without having to refresh each page.

    Thank you.

    #645041

    Artem Temos
    Keymaster

    Hello,

    It happens because of the position of the custom CSS relatively to our theme’s styles on first page load. To fix this issue, you need to strengthen your CSS selectors. As a simple workaround, try to add body tag to all selectors like this for example body .wd-custom-selector.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)