Creating a Child Themes Manually For
Автор: WP Event Manager ⦿ WordPress
Загружено: 2020-12-29
Просмотров: 1745
If you love your current theme but want to modify its features and look, the proper way to do so is by customizing its child theme. This tutorial will explain why this practice is necessary and guide you through the process so that you can create and edit a WordPress child theme regardless of your technical skills.
Why You Should Use WordPress Child Themes
Since a child theme inherits the characteristics of a master or a parent theme, you can customize its code without breaking the original’s functionality. This way, if a theme gets an update, all of the changes you made won’t be overwritten.
Another reason to use a child theme is that it offers a fail-safe solution if you ever mess up your edits. Plus, it allows you to efficiently track the parts you have changed since the files of a child theme are separate from its parent’s.
How WordPress Child Themes Work
As briefly alluded to earlier, a child theme is stored in a separate directory from the parent theme, each with its own style.css and functions.php files. You can add other files as necessary, but those two are the bare minimum required for a child theme to function correctly.
Using the relevant .css and .php files, you can modify everything from styling, layout parameters to actual coding and scripts used by a child theme even if the attributes aren’t present in its parent theme.
Think of it as an overlay. When a visitor loads your website, WordPress first loads the sub-theme, and then fills the missing styles and functions using parts from the master theme. As a result, you get the best out of your customized design without sacrificing the theme’s core functionality.
How to Create a Child Theme
1. Create a child theme folder
First, create a new folder in your themes directory, located at wp-content/themes.
The directory needs a name. It’s best practice to give a child theme the same name as the parent, but with -child appended to the end. For example, if you were making a child theme of twenty fifteen, then the directory would be named twenty fifteen-child.
2. Create a stylesheet: style.css
Next, you’ll need to create a stylesheet file named style.css, which will contain all of the CSS rules and declarations that control the look of your theme. Your stylesheet must contain the below-required header comment at the very top of the file. This tells WordPress basic info about the theme, including the fact that it is a child theme with a particular parent.
Code Used in this video - https://gist.github.com/jrsarath/93c5..., https://gist.github.com/jrsarath/5020...
Download Free Core WP Event Manager Plugin - https://wp-eventmanager.com/product/w...
More info about WP Event Manager: https://wp-eventmanager.com
WP Event Manager Channel: / @wpeventmanager
🙋♂️ Have a question? Leave a comment below and I’ll do my best to respond.
Facebook: / wpeventmanager
Twitter: / wp_eventmanager
Linkedin: / wp-event-manager
Github: https://github.com/wpeventmanager/wp-...

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: