{"id":69,"date":"2015-10-22T09:48:46","date_gmt":"2015-10-22T09:48:46","guid":{"rendered":"http:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/"},"modified":"2015-10-22T09:48:46","modified_gmt":"2015-10-22T09:48:46","slug":"create-child-theme-in-wordpress","status":"publish","type":"post","link":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/","title":{"rendered":"Create child theme in wordpress"},"content":{"rendered":"<p>Create child theme in wordpress is a best way of working with Premium themes. Child theme inherit all the functionality of parent theme. Here parent theme is the theme that we bought from online or the theme that is updated frequently. We have to work with child theme in order to keep our code updated.<\/p>\n<h2>why we should Create child theme in wordpress<\/h2>\n<p>One of my friend ask me why should not we work on main theme or parent theme directly? Why should you bother to create a child theme rather than working directly in a theme ?<\/p>\n<p>Well this a nice question we got. Simply say that in order to keep our customization alive just use the child theme. Whenever the theme is updated all the changes made in the parent theme is replaced by the new code sent by author of the theme. There might be various reason to do this. For security purpose they update their theme frequently. For updating functionality of woo commerc, also adding many new functionality etc..<\/p>\n<h3>How to Create child theme in wordpress<\/h3>\n<p>Creating a child theme in wordpress is a very easy. It just require a new folder inside the theme folder of your wordpress with your own website name or any other name that suit your brand. Just add a new style.css inside that folder and add a comment defining Template name, Theme name and its description with some other additional details.<\/p>\n<p>Below is a basic format for what you have to do to create child theme in WordPress<\/p>\n<pre><code>\n\/*!\n Theme Name:   Child theme\n Theme URI:    http:\/\/your-website.com\/\n Description:  Yourwebsite as a child theme.\n Author:       Santosh\n Template:     Parent theme name\n*\/\n<\/code><\/pre>\n<p>Note: \u201c!\u201d mark after the comment is open, it is only required for the developer who work with SASS\/COMPASS. It is just to tell the compiler that please ignore this comment and do not remove it from the output file.<\/p>\n<h2>Description about create child theme in wordpress<\/h2>\n<p><strong>Theme Name: Child theme<\/strong><br \/>\nIt can hold any name that you can help to brand your website. For eg: Santosh Shah, Santosh kumar shah etc <img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png\" alt=\"\ud83d\ude42\" \/><\/p>\n<p><strong>Theme URI: http:\/\/your-website.com\/<\/strong><br \/>\nThe url of your brand website.<\/p>\n<p><strong> Description: Yourwebsite as a child theme.<\/strong><br \/>\nA small description to brand your website.<\/p>\n<p><strong> Author: Santosh<\/strong><br \/>\nThe name of the person who creates this child theme.<\/p>\n<p><strong> Template: Parent theme name<\/strong><br \/>\nVery strict!!<br \/>\nUse the theme name for which you are going to create a child theme.<\/p>\n<p>Do not forget to import the parent theme <code>style.css<\/code> in child theme.<br \/>\nSo the whole css code to make the child theme work is below:-<\/p>\n<pre><code>\n\/*!\n Theme Name:   Child theme\n Theme URI:    http:\/\/your-website.com\/\n Description:  Yourwebsite as a child theme.\n Author:       Santosh\n Template:     Parent theme name\n*\/\n@import \"..\/parent-theme\/style.css\"\n<\/code><\/pre>\n<p>or you can use the below script to <code>function.php<\/code><\/p>\n<pre><code>\nadd_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );\nfunction theme_enqueue_styles() {\n    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '\/style.css' );\n}\n<\/code><\/pre>\n<p>I hope this helps. Thanks for reading this tutorial. <img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png\" alt=\"\ud83d\ude42\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create child theme in wordpress is a best way of working with Premium themes. Child theme inherit all the functionality of parent theme. Here parent theme is the theme that we bought from online or the theme that is updated frequently. We have to work with child theme in order to keep our code updated. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create child theme in wordpress - Santosh Kumar Shah<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create child theme in wordpress - Santosh Kumar Shah\" \/>\n<meta property=\"og:description\" content=\"Create child theme in wordpress is a best way of working with Premium themes. Child theme inherit all the functionality of parent theme. Here parent theme is the theme that we bought from online or the theme that is updated frequently. We have to work with child theme in order to keep our code updated. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Santosh Kumar Shah\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-22T09:48:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png\" \/>\n<meta name=\"author\" content=\"Santosh Kumar Shah\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Santosh Kumar Shah\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/\",\"url\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/\",\"name\":\"Create child theme in wordpress - Santosh Kumar Shah\",\"isPartOf\":{\"@id\":\"https:\/\/santosh-shah.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png\",\"datePublished\":\"2015-10-22T09:48:46+00:00\",\"author\":{\"@id\":\"https:\/\/santosh-shah.com\/blog\/#\/schema\/person\/b17cb45bdd5f518e74a08ad2c6c4b39f\"},\"breadcrumb\":{\"@id\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#primaryimage\",\"url\":\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png\",\"contentUrl\":\"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/santosh-shah.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create child theme in wordpress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/santosh-shah.com\/blog\/#website\",\"url\":\"https:\/\/santosh-shah.com\/blog\/\",\"name\":\"Santosh Kumar Shah\",\"description\":\"JavaScript Developer\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/santosh-shah.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/santosh-shah.com\/blog\/#\/schema\/person\/b17cb45bdd5f518e74a08ad2c6c4b39f\",\"name\":\"Santosh Kumar Shah\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/santosh-shah.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cf46c57219d897547f3204b6b302169b3302b17507ccc902946b622a78d0b98b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cf46c57219d897547f3204b6b302169b3302b17507ccc902946b622a78d0b98b?s=96&d=mm&r=g\",\"caption\":\"Santosh Kumar Shah\"},\"description\":\"I am JavaScript developer.\",\"sameAs\":[\"https:\/\/santosh-shah.com\/blog\"],\"url\":\"https:\/\/santosh-shah.com\/blog\/author\/sks7yu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create child theme in wordpress - Santosh Kumar Shah","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"Create child theme in wordpress - Santosh Kumar Shah","og_description":"Create child theme in wordpress is a best way of working with Premium themes. Child theme inherit all the functionality of parent theme. Here parent theme is the theme that we bought from online or the theme that is updated frequently. We have to work with child theme in order to keep our code updated. [&hellip;]","og_url":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/","og_site_name":"Santosh Kumar Shah","article_published_time":"2015-10-22T09:48:46+00:00","og_image":[{"url":"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png","type":"","width":"","height":""}],"author":"Santosh Kumar Shah","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Santosh Kumar Shah","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/","url":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/","name":"Create child theme in wordpress - Santosh Kumar Shah","isPartOf":{"@id":"https:\/\/santosh-shah.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png","datePublished":"2015-10-22T09:48:46+00:00","author":{"@id":"https:\/\/santosh-shah.com\/blog\/#\/schema\/person\/b17cb45bdd5f518e74a08ad2c6c4b39f"},"breadcrumb":{"@id":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#primaryimage","url":"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png","contentUrl":"https:\/\/s.w.org\/images\/core\/emoji\/12.0.0-1\/72x72\/1f642.png"},{"@type":"BreadcrumbList","@id":"https:\/\/santosh-shah.com\/blog\/create-child-theme-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/santosh-shah.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create child theme in wordpress"}]},{"@type":"WebSite","@id":"https:\/\/santosh-shah.com\/blog\/#website","url":"https:\/\/santosh-shah.com\/blog\/","name":"Santosh Kumar Shah","description":"JavaScript Developer","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/santosh-shah.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/santosh-shah.com\/blog\/#\/schema\/person\/b17cb45bdd5f518e74a08ad2c6c4b39f","name":"Santosh Kumar Shah","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/santosh-shah.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cf46c57219d897547f3204b6b302169b3302b17507ccc902946b622a78d0b98b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf46c57219d897547f3204b6b302169b3302b17507ccc902946b622a78d0b98b?s=96&d=mm&r=g","caption":"Santosh Kumar Shah"},"description":"I am JavaScript developer.","sameAs":["https:\/\/santosh-shah.com\/blog"],"url":"https:\/\/santosh-shah.com\/blog\/author\/sks7yu\/"}]}},"_links":{"self":[{"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":0,"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"wp:attachment":[{"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/santosh-shah.com\/blog\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}