How to make Child Theme WordpressMaking Child Theme Wordpress
Creating a WordPress Child Theme
Read this week's Quick Start Guide to create a child's theme in WordPress. However, if you want to make major changes - especially to the PHP in the templates themselves - this is not enough. At this point, you should use a child design in WordPress. When you' re done learning, watch the tutorial below.
We' ve covered in detail why you should use a child design if you want to modify the way the design you use works on a WordPress page. A brief overview of any changes you make that were not made to a child design will be dropped when you upgrade your design (which you should do often to avoid safety problems and get new features).
Insert a new subdirectory in your theme subdirectory (wp-content/themes). I do this first on my local machine (in the my websites subfolder, as distinct from directly attaching to my server): It is a popular practice when you are creating this new file to use the name of the higher-level theme and use -child to do this.
I am using a topic in this case whose binder is entitled ''Rosemary'', so my subordinate topic binder is entitled ''Rosemary Child''. Make a new style.css and put it in this directory. It is the most important and only data you need for a sub-theme. Most important as here is my template: rosmary.
It says WordPress the (folder name) or my superior design. In fact, all other rows are used in all WordPress topics! An @import url('../rosemary/stylesheet.css') as the first non-comment line of your style sheet is the simplest one. _GO ( As you might suspect, you are changing the rosemary to what you used as a template: value in comments).
Read this article by Justin Tadlock for more information about other (probably better) ways to incorporate your style sheet into a child's theme. Although you can still have more pages added to your child theme, one style sheet is enough to begin customising your theme. It' good to keep in mind that every sub-theme will overwrite the sub-theme files in the higher directory, except functions.php.
Read our article on why you should always use one for more information on children's topics! Bring the latest WordPress developerutorials, tips and innovations to your mailbox.