Override parent files in the child theme

Featured Theme Forums Bootville Override parent files in the child theme

This topic contains 3 replies, has 2 voices, and was last updated by  zeaks 1 month, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18216

    zhart
    Participant

    Hello and thanks for great theme.
    Is it any way to override in child theme not only main style.css and template files, but also override some other theme files? In my case I want override some bootswatch styles in “css” folder. And also I want add some my own style files to “css” folder and add records about them to “inc/redux-config.php” file located in my child theme directory. What the best way to implement this intention? Perhaps I should make some changes to file “functions.php” located in my child theme directory?

    #18221

    zeaks
    Keymaster

    Hi Zhart, Child themes are meant to modify template files, add custom functions and CSS. Although you can modify options files it’s not recommended.

    I have not tried but copying the bootswatch styles to your child theme using the same path and modifying those may work.

    A better alternative to edit the bootswatch styles would be to use the custom CSS area in theme options which should override all styles.

    #18222

    zhart
    Participant

    I have not tried but copying the bootswatch styles to your child theme using the same path and modifying those may work.

    Unfortunately it does not work. I have tried this option before creating this topic.

    A better alternative to edit the bootswatch styles would be to use the custom CSS area in theme options which should override all styles.

    This is not a good alternative for me. I used to work with CSS in my favorite text editor (Sublime Text), and upload files directly by editor via FTP. It is very convenient and fast, unlike using the custom CSS area in options page. Moreover, if the code from custom CSS area is inserted directly into the body of the html-page (not a separate CSS-file), this is a bad approach for me. But in general is not a problem because I can edit the main CSS-file from child theme (style.css). My question was about how to create some of my own css-sets (located on “css”-folder of child theme) and switch between them without changing parent theme.

    In any case, I’ll wait until you release a new version before I will continue to work with Bootville theme. If the new version will include all bootswatch sets that I may not need such alterations.

    #18223

    zeaks
    Keymaster

    I will look into this and see if I can come up with a better way to add your own styles and edit the redux config from a child theme. I think deregistering the redux config file and loading your own in the child theme may work but I haven’t tried to do this.

    You’re right, the custom CSS area is great for adding small adjustments but if you’re adding a lot of CSS as you seem to be it can be annoying to use instead of a text editor and FTP.

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

You must be logged in to reply to this topic.