月別アーカイブ: 2014年4月

child theme

How to Create a Child Theme (bad practise now)

  • Child Theme directory structure

    Create a directory in your themes directory to hold the child theme. The theme directory is wp-content/themes. You should name the directory without any space as part of the name, and it is common practice to use the name of the parent theme folder with “-child” appended to it. For example, if you are making a child of the twentyfourteen theme, your folder name would be twentyfourteen-child.

  • In the child theme directory, create a file called style.css. This is the only file required to make a child theme. The style sheet must start with the following lines:
/*
 Theme Name:   Twenty Fourteen Child
 Theme URI:    http://example.com/twenty-fourteen-child/
 Description:  Twenty Fourteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfourteen
 Version:      1.0.0
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fourteen-child
*/

@import url("../twentyfourteen/style.css");

/* =Theme customization starts here
-------------------------------------------------------------- */

You can change each of these lines to suit your theme. The only required lines are the Theme Name, and the Template. The Template is the directory name of the parent theme. In this case, the parent theme is the TwentyFourteen theme, so the Template is twentyfourteen, which is the name of the directory where the TwentyFourteen theme resides. If you want to make a child of a theme with the directory name example-theme-name, then you would use Template: example-theme-name.

import

Prepare beforehand custom post type and taxonomy to accept  the source WP site.

Plugin “Custom Post Type UI” will do.

Many people suggest the following in case of trouble.

1) Download and Install 7zip.
2) Right click on your .XML file -> 7zip -> Add to Archive
3) Change the “Archive format” to gzip and hit “OK”. You’ll now see your file with a .gz extension on it.
4) Try to import/upload the file again (selecting the .gz you just created not the .xml file) and it should work.