Child theme

Dear athemes,
I really like this Fashionistas theme, but for some reason I fail to create child theme.
I’ve used child themes, but I didn’t have the need to create one myself. I was following instructions in wordpress codex, but there is no template line in your style.css file.

I was trying with this, but it cannot be installed, asking every time for index.php file.

/*
Theme Name: Fashionistas
Theme URI: https://athemes.com/theme/fashionista
Author: aThemes
Author URI: https://athemes.com
Description: Fashionistas is a bold and fun theme built on Bootstrap, suitable for magazine style blogs.
Version: 1.3
License: GNU General Public License v3.0
License URI: license.txt
Tags: black, white, two-columns, fixed-layout, threaded-comments, full-width-template, custom-menu
*/

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

Could you please help me with this?

Best,
Danica

Hi

what did you mean by template line above? Also can you share the file header details of the child theme’s style.css.

Also please go through this blog and let me know if this helps.

Thanks

Hi Matty,
I did add file header details previously, but I will try to be more precise this time.

First, these are file header details from fashionistas theme:

/*
Theme Name: Fashionistas
Theme URI: https://athemes.com/theme/fashionista
Author: aThemes
Author URI: https://athemes.com
Description: Fashionistas is a bold and fun theme built on Bootstrap, suitable for magazine style blogs.
Version: 1.3
License: GNU General Public License v3.0
License URI: license.txt
Tags: black, white, two-columns, fixed-layout, threaded-comments, full-width-template, custom-menu
*/

I wanted to use it as a base for my child theme adding one more line as suggested in wordpress codex: @import url("…/fashionistas/style.css");
Basic instructions for child theme put accent, not onto theme name, or theme url, but on template. And I don’t have that information in fashionistas theme’s style.css header.

Link you provided for tutorial gives this example of header:

/**
 * Theme Name:   sourcexpress
 * Theme URI:    http://www.sourcexpress.com/
 * Description:  Hueman Child Theme
 * Author:       Maruti Mohanty
 * Author URI:   http://www.sourcexpress.com/
 * Template:     hueman
 * Version:      1.0.0
*/
@import url("../hueman/style.css");

So I don’t know is there another way to make connection between child and parent theme.

I will make css changes, that’s not the issue (that’s why I didn’t add my site’s link), I just feel like a total dummy having problems with creating simple child theme.

Thank you!

for Fashionista it is


template : fashionistas

It is the name of the folder the theme files are contained in .

Hope it helps

Dear Matty,
Thank you for quick answer, but the problem is that there is no line that mentions template in the header of original theme. When I add to my child theme template: fashionistas, as you mentioned, and as I already tried, wordpress reports error in child theme.

I was hoping someone successfully created child theme, and was happy to share style.css file. Or some of you guys behind athemes tested it, and have example for simple child theme’s style.css file.

Anyhow, I will try to solve this myself. Hope it’ll work out eventually.

Best,
Danica

can you share the details of the style.css header and also let us know if you are using @import to import the parent theme style.css

Also let us know if the child theme contains any other file?

you can just add this to the child theme’s header


/**
 * Theme Name: sourcexpress
 * Template: fashionistas 
 * Version: 1.0.0
*/
@import url("../fashionistas/style.css");


and then go the theme appearance >> themes and activate sourcexpress (the child theme)

Please check by adding these lines

Great!
You’re the man Matty!

Thank you!

You are welcome :slight_smile:

Hi guys! I’m glad you were able to figure this out! I’ve referred to your conversation above and I STILL can’t figure this out. I have created a Child Theme folder in my host server and I’ve created a style.css with the above code suggested:

/**

  • Theme Name: sourcexpress
  • Template: fashionistas
  • Version: 1.0.0
    */
    @import url("…/fashionistas/style.css");

This is now saved under my child theme folder on the server however when I go to appearance-> themes in wordpress I get the error message that my theme has been created but stylesheet is missing… How can I fix this?

Thank you!