Moderator
Yui
(@fierevere)
永子
You can add CSS without editing any files or creating child theme
Dashboard > Appearance > Customize > Additional CSS
If you are going to override only small pieces of theme CSS – just use the above thing.
The rest of your child theme questions are covered here:
https://developer.ww.wp.xz.cn/themes/advanced-topics/child-themes/
if you want easier child theme creation, you can try this plugin
https://ww.wp.xz.cn/plugins/child-theme-configurator/
Since your site wont live on localhost forever, you will need to migrate it, here are many ways to do this, easiest way is to use migration plugins
such as https://ww.wp.xz.cn/plugins/duplicator/
Joy
(@joyously)
Your questions don’t seem related to localhost.
When you use a theme written by someone else, it’s best not to alter it because the way that WordPress updates themes is: download the new version and unzip it into a temporary folder, delete the theme’s original folder, move the temporary folder to the themes folder. This means that your changes would be deleted whenever the theme author updates the theme.
If you create a child theme, your changes are in the child theme folder only. So the parent theme can be updated without affecting your changes.
When you have a child theme, you can put your CSS into the child style sheet which you need to load anyway. There is no need for a separate plugin. CSS should be in its own file, not in header.php.
“what to do before and after creating a website using localhost” makes no sense to me. The site is on your computer. What is before and after about?
@fierevere
If you are going to override only small pieces of theme CSS – just use the above thing.
could you elaborate what are the type of small changes? would this include like adding new fonts, changing of colors?
The things is i keep reading that people are recommending to create a child theme if you want to make changes. So that’s why i’m checking this information.
@joyously thanks for the explanation. the reason i’m asking this question in relation to localhost is because i’m trying to create a site using localhost. so i need to know this information before going further like is it really necessary to create a child theme in this process. all this is very new to me and i’m just trying to get more information.
Moderator
Yui
(@fierevere)
永子
could you elaborate what are the type of small changes? would this include like adding new fonts, changing of colors?
Its better to keep inserted snippet smaller, however here is no limit in size.
If you use something really long and manage to keep its readable and understandable – its okey 🙂
Joy
(@joyously)
If you want to add a font, you will need to load it, so you need a child theme. It can’t be done with CSS alone.
Moderator
Yui
(@fierevere)
永子
to add a font, you will need to load it
here is no problem with @font-face { } in additional css
I dont know if there are any 🙂
Joy
(@joyously)
I suppose you are correct Yui, the @font-face is CSS, but it is usually in a file due to having special characters and being quite long. (and different formats for different browsers or operating systems)