WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Have child theme edit /css (7 posts)

  1. adroidman
    Member
    Posted 1 year ago #

    Hi,

    I am using Boldy by site5 and have done quite a few changes to it. One change that I can not figure out is editing the ddsmoothmenu. It is located in /boldy/css/ddsmoothmenu.css. I have tried to override the styles in my childtheme but they will not work. Is there a way that I can have /boldy-child/css/ddsmoothmenu.css? I can create the directory and move the file with the edits up but it will not work. Do I need to create a ddsmoothmenu.css and just use @import to pull in the Parent's? I only made 2 edits to the color so it is not a major deal, I am just trying to have all of my files in one place.

    Grady

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You can ask the guys who made that theme http://gk.site5.com/t/542

  3. adroidman
    Member
    Posted 1 year ago #

    I am just looking at how to have my Child theme read the file. I have no problem writing php/css/HTML just can not get the child theme to pull in the file.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    In general, no you don't need another CSS file - you just need to use relevant and specific enough selectors in your child theme CSS to override the existing/parent styles. But there may be something unusual in your theme or set-up -- can you post a link to your site and the specific change you are trying to make?

  5. adroidman
    Member
    Posted 1 year ago #

    Hey,

    This is the site I am working on, http://wordpress.calvarychapelofcharleston.org/

    The changes that need to be made,
    * The Slider has 3 images, (2 arrows and a blue box) these need to be changed to green. Simple image edit I did but the css file that calls them is located in Boldy/css/nivo-slider.css
    * The navbar I want to update the .js file. I was able to do so by manually moving it to /boldy/js/ddsmoothmenu.js but I do not want it getting outdated when they update the theme (They do not update it as it is not worth it for them)
    * In the dropdown I need to edit the css that goes with it, located in /boldy/css/ddsmoothmenu.css. I have put the edits into style.css but they will not override it unless I make the changes to that file.

    So I need 1 js file and 2 CSS files. I know that the JS file was not mentioned in the first post but I was hoping that the answer would be universal and I could easily apply it to other parts of the theme.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Looks like the reason the child theme is not overriding the other stylesheets is that the other stylesheets are being loaded after the child theme. CSS is read top down so that makes sense. One way to deal with that, though not ideal, is to use !important in the CSS changes.

    http://css-tricks.com/when-using-important-is-the-right-choice/

    I don't know about the JS.

  7. adroidman
    Member
    Posted 1 year ago #

    Thank you that did the trick. I will keep looking for the JS answer.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.