• Resolved askingwoo

    (@askingwoo)


    Hi.

    I installed wordpress 4.2 in a sub-directory on my server. (http://site.com/sub)
    Using child theme of Shopkeeper theme.

    And I changed the site url to root (http://site.com) as following the instructions on https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory.

    The website seems to work fine,
    but there is an error message “Template is missing.” on Admin > Appearance > Themes, and the page template dropdown is gone on Admin > Pages > edit.

    I created another child theme of Twentyfourteen, and it has same error message.

    I checked known causes about missing templates. (lower case template name etc…).

    Anybody tell me what’s wrong about it, please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Make sure you have a a stylesheet header inside the child theme’s style.css.

    Inside the style sheet header you must have a field for Parent Template.

    For instance the stylesheet header could look something like this:

    /*
    Theme Name: Brett's New Child Theme for TwentyFifteen
    Theme URI: http://wordpress.org
    Author: Brett
    Template: twentyfifteen
    */

    Check the style.css again to see if the “template” field can be found.

    Thread Starter askingwoo

    (@askingwoo)

    I checked my style.css many times.
    It worked fine before I changed the site url.

    The strange thing is, site works almost fine, except the page template part.

    Thread Starter askingwoo

    (@askingwoo)

    After several hours of digging, I couldn’t find the solution. So I decided reinstall the child theme.
    And it worked. The error message is gone.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child theme error "Template is missing." after changing site URL’ is closed to new replies.