[Genesis framework] How to edit child theme CSS & PHP files and notes

2019/5/26

How to customize your site by editing the child theme's style.css and functions.php in the Genesis framework.Unlike ordinary Wordpress themes, the Genesis framework has a different relationship between parent and child themes, so you need to be a little careful.

Precautions due to differences in theme structure

一般 的 なJapanese WordPress themeIs often configured as follows.

Parent theme: Theme template body (site structure & design)
Child theme: Used for site design editing

The parent theme itself includes all the basic theme designs.When updating, the parent theme that is the main body will be changed, so I think that you are writing the code to customize the design in the child theme.

On the contrary,Genesis frameworkThe roles of the parent theme and the child theme are as follows.

Parent theme: Genesis framework body (framework = site structure)
Child theme: Site design body

The parent theme (framework) has a fairly simple design, with only basic functions suppressed.And you can buy child themes from various developers and change the design of your site as you like.

In other words, the child theme itself will be renewed by the update and maintenance of the provider, so the edit of the design side you want to add cannot be a child theme.

Unlike domestic themes, you need to be careful when editing in this respect.

Customize style.css

However, there are no particularly complicated steps.

Appearance → Customize → Additional CSS

So just write to the additional CSS.

Customization of functions.php

Avoid changing function.php directly from the child theme,Code SnippetsIt is recommended to edit using the plug-in called.

https://ja.wordpress.org/plugins/code-snippets/

It is a plugin for editing function.php that is highly rated and has more than 10 installed.Even if the child theme is updated, the edited contents will be maintained without any problem.Also, it seems that it is designed with less load on the site.