{"id":14,"date":"2026-05-04T07:56:22","date_gmt":"2026-05-04T07:56:22","guid":{"rendered":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/child-theme\/"},"modified":"2026-05-04T07:56:22","modified_gmt":"2026-05-04T07:56:22","slug":"child-theme","status":"publish","type":"post","link":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/child-theme\/","title":{"rendered":"Child Themes"},"content":{"rendered":"\n<p class=\"is-lede\">When custom CSS isn&#8217;t enough, a child theme is the right tool. Here&#8217;s a minimal one for MyWiki.<\/p>\n\n\n\n<p>A child theme inherits everything from MyWiki and lets you override individual files. Your customizations survive parent theme updates because they live in a separate folder.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"folder\">Create the folder<\/h2>\n\n\n\n<p>Inside <code>wp-content\/themes\/<\/code>, create a folder called <code>mywiki-child<\/code>. Inside it, two files: <code>style.css<\/code> and <code>functions.php<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"style\">Minimal style.css<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/*\nTheme Name: MyWiki Child\nTemplate: mywiki\nVersion: 1.0.0\n*\/\n\n\/* your custom styles below *\/<\/code><\/pre>\n\n\n\n<p>The <code>Template:<\/code> line is what makes WordPress treat this as a child of MyWiki.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"functions\">Minimal functions.php<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nadd_action( 'wp_enqueue_scripts', function() {\n    wp_enqueue_style( 'mywiki-style', get_template_directory_uri() . '\/style.css' );\n    wp_enqueue_style( 'mywiki-child-style',\n        get_stylesheet_directory_uri() . '\/style.css',\n        array( 'mywiki-style' )\n    );\n} );<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"activate\">Activate it<\/h2>\n\n\n\n<p>In WordPress admin, go to <strong>Appearance u2192 Themes<\/strong>. You&#8217;ll see <em>MyWiki Child<\/em> alongside MyWiki. Activate the child.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"override\">Override a template<\/h2>\n\n\n\n<p>To customize a template (say, <code>single.php<\/code>), copy the file from the parent theme into your child&#8217;s folder. WordPress will use your version. Don&#8217;t edit the parent u2014 it&#8217;ll be overwritten on update.<\/p>\n\n\n\n<div class=\"wp-block-group is-callout is-callout-info\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\"><p>If you&#8217;re activating MyWiki Pro, activate it BEFORE switching to the child theme. The Pro plugin attaches to whichever MyWiki theme is active.<\/p><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When custom CSS isn&#8217;t enough, a child theme is the right tool. Here&#8217;s a minimal one for MyWiki.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-customization"],"_links":{"self":[{"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":0,"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.fasterthemes.com\/mywiki-wordpress-theme\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}