Creating a child theme and making your changes there is the only recommended way of making changes to themes. Some people think that this is overkill for small changes. My own view is that creating a child theme is so easy, you’d might as well do it.
To create a child theme, you follow the instructions at the end of the link I posted in my last post. They’re quite simple:
- Create a folder for your theme in wp_content/themes
- Create a file in that folder called style.css
- Add the necessary comments to the top of style.css
- Add an
@import
statement immediately after the comment block in order to import the styles from the parent theme
For details, follow the link. I normally create the directory, initially, on my local machine in some convenient location. I then create and edit the style.css file inside that directory and then upload the directory and its contents using an FTP client (FileZilla, in my case).
The comment block in your child theme’s style.css file should contain the name of your theme, which is an arbitrary string, but obviously should not be the same name as your parent theme. It also needs to contain the name of the template (i.e. the parent), in the form of the name of the directory in which the parent theme is to be found. Note that directory names are case sensitive.
Once you have done this, you can go to Dashboard –> Appearance –> Themes and activate your child theme. Your site should look exactly as it did before, although you may have to redo some of the configurations you did in the parent theme, such as assigning a primary navigation menu and so on.
When your child theme is working, you can add your new style rules to the end of the child theme style.css file. You can do this from the Dashboard editor if that’s your preferred way of doing things.
If you don’t want to create a child theme and are happy to risk updates to your theme overwriting any changes you make, then you can just add any new styles you want, to the bottom of your theme’s style sheet; using the Dashboard editor, if you want. The chances of updates overwriting your changes are not usually all that great, to be honest, unless you are using a default theme. However, if you have made changes to a theme directly, it is always wise to ensure you have a backup of your changes so that you can put them back if they do get overwritten.
HTH
PAE