• I want to change a file but it is called: theme.min.css?ver=1367249842. I can only find a file called theme.min.css and when I do edit that it doesn’t update. Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You shouldn’t modify theme files directly – instead make changes using a Custom CSS option or plugin.

    Thread Starter eolproductions

    (@eolproductions)

    But the code that I need to change means that I will need to edit it directly.

    you seem to edit the right file (you can ignore the ?ver= part).

    what method are you using to edit the file?

    what theme are you using?

    what exactly do you need to change?

    WPYogi is right. You shouldn’t edit Theme files directly, because if/when you update your theme, your changes will be overwritten.

    If you create a child theme of the theme you’re currently using, you can overrule the styles that are in theme.min.css.

    Making a Child Theme isn’t a difficult process once you understand how to do it. It’s basically creating a folder and a css file.

    In your wp-content/themes/ folder, create a new folder called my-child-theme (or whatever you like). Inside that folder, create a file called style.css.

    In style.css, put the following header, with the appropriate edits:

    /*
    Theme Name:     my-child-theme [or whatever you want to call it]
    Theme URI:      https://example.com/
    Description:    Child theme for the [Your main Theme] theme
    Author:         Your name here
    Author URI:     https://example.com/about/
    Template:       twentytwelve [Put your main Theme's folder name here]
    Version:        0.1.0
    */

    Then, in that style.css, include the following line:
    @import url("../[Main Theme's folder name]/style.css");
    this will pull in the CSS from the Main (Parent) Theme

    …then add your css edits and save the file.

    After that, go to Appearance>Themes and activate your Child Theme.

    If that doesn’t work, first check to see if your style.css is being pulled in at all (between the page’s <head> tags). If it is, then your issue is with your css.

    If you still need help, I recommend checking out the Child Theme article, but if that doesn’t help, let me know.

    Thread Starter eolproductions

    (@eolproductions)

    alchymyth – I am using the code editor in file viewer in cPanel. I am using the theme: Halfcreative. I just wanted to change some of the header colours, page widths and things like that.

    Any of those can be changed in custom CSS – it will OVERRIDE the existing CSS of your theme and won’t be lost when the theme is updated.

    But since that’s a commercial theme, please ask the developer for help:

    https://themeforest.net/item/halfcreative-one-page-portfolio-wordpress-theme/4566909

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I edit a css file?’ is closed to new replies.