Support » Localhost Installs » Child Theme says template is missing?

  • Resolved mvdarby

    (@mvdarby)


    Hi Folks,

    I am very very new to all this and I am finding it a steep learning curve… but having fun with it. So to get to the point… Child Themes… hmmm.

    I am just trying to get my head round child themes etc and have hit a bit of a brick wall. So I am following a video on Lynda.com by Morten Rand-Hendriksen called “Installing and Running WordPress MAMP”. Part of that video lesson walks you through the process of creating a child theme using twenty seventeen as the parent theme.
    I have gone through this step by step to create the Twenty Seventeen Child but WordPress keeps telling me..
    “Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet.”

    I have my twenty seventeen-child folder with my style.css file in. My style.css folder has the following information in

    /*
    Theme name: Twenty Seventeen Child
    Version: 1.0
    Template: twentyseventeen
    */

    Any ideas where I am going wrong?

    Just for information this is being done on a local host.

    Thanks folks, forgive the newbie.
    Mark

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Steve Stern

    (@sterndata)

    Is twentyseventeen installed? Basic, but necessary, question!

    By the way, you can compare your functions.php header and style.css header to my own 2017 child theme, as a point of reference.
    https://github.com/sterndata/sds_2017

    Hi Steve

    Thank you for the very quick reply. Yes twenty seventeen is installed. I’ve had a look at your style.css just to compare and There is nothing glaringly obvious that I can see. I do freely admit though I am MOST definitely not a developer and today is my very first venture into any form of coding at all.

    Mark

    Moderator Steve Stern

    (@sterndata)

    So twentyseventeen is in wp-content/themes/twentyseventeen and your child is in wp-content/themes/soemthingelse?

    Hi Steve,

    Yep… I have
    wp-content/themes/twentyseventeen
    and then
    wp-content/themes/twentyseventeenchild

    Mark

    Moderator Steve Stern

    (@sterndata)

    If you activate the twentyseventeen theme, it works?

    Yep… no issues with the twenty seventeen theme working

    Moderator Steve Stern

    (@sterndata)

    copy my style.css over yours and see if it works.

    Hi Steve,

    Sorry for the late reply, real life got in the way for a bit.

    I copied your style.css across and guess what… same error message! odd! Any ideas?

    Mark

    Ok… Just to add a bit more meat to the bones here I have just discovered something else….

    So when I create my theme child folder and then add in my style.css using my text editor (Atom or Text Wrangler) I can see the file and all my text. I go to the themes page on WordPress and get the problematic error message as described in my previous posts.

    I then close my text editor, go to my style.css file in Finder only to see that the file has no script in it. I open the file up in ATOM or Text Wrangler and there is no script what so ever in my style.css! I am assuming that this is what is causing the issue… just to be safe I tried this with your style.css Steve and had the same result. I can see your file in my text editor but once I close that and look at the contents of the style.css file it’s empty!

    So here is the dumbass question… is there something I am not doing with my text editor that I should be?

    Problem solved… and please don’t laugh to hard at this!

    Turns out I wasn’t saving what I was editing! Once I had finished editing my style.css I had failed to hit save and hence to changes were taking place.

    Told yo uI was new to all this…. every day is a learning day though. Thanks for your help though Steve… I doubt this will be the last time I appear on the Forums.

    Mark

    Moderator Steve Stern

    (@sterndata)

    🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.