{"id":646,"date":"2019-05-04T12:50:35","date_gmt":"2019-05-04T12:50:35","guid":{"rendered":"https:\/\/mdesignsmarketing.com\/operations_manual\/?p=646"},"modified":"2021-07-04T14:01:00","modified_gmt":"2021-07-04T14:01:00","slug":"how-to-create-a-child-theme","status":"publish","type":"post","link":"https:\/\/mdesignsmarketing.com\/operations_manual\/2019\/05\/04\/how-to-create-a-child-theme\/","title":{"rendered":"How to create a child theme."},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-648 size-full\" src=\"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-content\/uploads\/2019\/05\/ChildTheme-AdobeStock_190137520Small.jpg\" alt=\"\" width=\"1963\" height=\"1037\" srcset=\"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-content\/uploads\/2019\/05\/ChildTheme-AdobeStock_190137520Small.jpg 1963w, https:\/\/mdesignsmarketing.com\/operations_manual\/wp-content\/uploads\/2019\/05\/ChildTheme-AdobeStock_190137520Small-300x158.jpg 300w, https:\/\/mdesignsmarketing.com\/operations_manual\/wp-content\/uploads\/2019\/05\/ChildTheme-AdobeStock_190137520Small-768x406.jpg 768w, https:\/\/mdesignsmarketing.com\/operations_manual\/wp-content\/uploads\/2019\/05\/ChildTheme-AdobeStock_190137520Small-700x370.jpg 700w, https:\/\/mdesignsmarketing.com\/operations_manual\/wp-content\/uploads\/2019\/05\/ChildTheme-AdobeStock_190137520Small-600x317.jpg 600w\" sizes=\"auto, (max-width: 1963px) 100vw, 1963px\" \/><\/p>\n<ol>\n<li>Create a new folder for the child theme in the themes folder. Name it the same as its parentexcept add: -child at the end.<\/li>\n<li>Add a .css file called style.css<\/li>\n<li>Paste this code into the .css (except updated to correct template name):<br \/>\n<code>\/*Theme Name: Twenty Seventeen ChildTheme<br \/>\nURI: http:\/\/example.com\/twenty-seventeen-child\/<br \/>\nDescription: Your first child theme!<br \/>\nAuthor: John DoeAuthor<br \/>\nURI: http:\/\/example.com<br \/>\nTemplate: twentyseventeenVersion: 1.0.0<br \/>\nLicense: GNU General Public License v2 or later<br \/>\nLicense URI: http:\/\/www.gnu.org\/licenses\/gpl-2.0.html<br \/>\nTags: child themeText<br \/>\nDomain: twenty-seventeen-child*\/<\/code><\/li>\n<li>Next add a functions.php file to the same directory as the .css.<\/li>\n<li>Paste this code into the .php: <code>&lt;?php<br \/>\nadd_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );<br \/>\nfunction theme_enqueue_styles() {<br \/>\nwp_enqueue_style( 'parent-style', get_template_directory_uri() . '\/style.css' );<br \/>\n}<br \/>\n<\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Create a new folder for the child theme in the themes folder. Name it the same as its parentexcept add: -child at the end. Add a .css file called style.css Paste this code into the .css (except updated to correct template name): \/*Theme Name: Twenty Seventeen ChildTheme URI: http:\/\/example.com\/twenty-seventeen-child\/ Description: Your first child theme! Author: John DoeAuthor URI: http:\/\/example.com Template: twentyseventeenVersion: 1.0.0 License: GNU General Public License v2 or later License URI: http:\/\/www.gnu.org\/licenses\/gpl-2.0.html Tags: child themeText Domain: twenty-seventeen-child*\/ Next add a functions.php file to the same directory as the .css. Paste this code into the .php: &lt;?php add_action( &#8216;wp_enqueue_scripts&#8217;, &#8216;theme_enqueue_styles&#8217; ); function theme_enqueue_styles() { wp_enqueue_style( &#8216;parent-style&#8217;, get_template_directory_uri() . &#8216;\/style.css&#8217; ); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[36,1],"tags":[],"class_list":["post-646","post","type-post","status-publish","format-standard","hentry","category-operations-manual-entrys","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/posts\/646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/comments?post=646"}],"version-history":[{"count":11,"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/posts\/646\/revisions"}],"predecessor-version":[{"id":659,"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/posts\/646\/revisions\/659"}],"wp:attachment":[{"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/media?parent=646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/categories?post=646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mdesignsmarketing.com\/operations_manual\/wp-json\/wp\/v2\/tags?post=646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}