0

I have been trying to change my HTML website over to Wordpress. When I load the new theme, it says it is installed but that the Parent Theme is missing, please install. How do I do that? I have copy and pasted all the code into the files to transfer it to Wordpress. These files are header.php, footer.php, style.css, and sidebar.php. This website was designed years ago and was HTML. I feel like I am really close but I don't know how to create the Parent Theme when it was created outside of Wordpress. Please help if you can. Best, Helen

1 Answer 1

0

You miss index.php as it is required - https://developer.wordpress.org/themes/getting-started/what-is-a-theme/#required-files

In style.css you have setup your theme as a child, that is second option for this message.

Parent theme is two file style.css and index.php. This parent theme style need to be without line about template - remove 7 line from this example if you have - https://developer.wordpress.org/themes/advanced-topics/child-themes/#2-create-a-stylesheet-style-css Template line suggest using it as child theme rather than parent

14
  • 1
    Hi, Sorry, I forgot to mention that I do have index.php as well.
    – Helen Todd
    Jul 11, 2021 at 19:37
  • 1
    Ok, I forgot to mention that I do have index.php as well. I just removed line seven in the style.css file.
    – Helen Todd
    Jul 11, 2021 at 19:39
  • in my index.php file, I have the following code:'
    – Helen Todd
    Jul 11, 2021 at 19:40
  • <?php get_header(); ?> <?php define( 'WP_USE_THEMES', false ); get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php endwhile; else : ?> <p><?php esc_html_e( 'Sorry, no posts matched your criteria.' ); ?></p> <?php endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
    – Helen Todd
    Jul 11, 2021 at 19:40
  • i followed the following steps in this article:
    – Helen Todd
    Jul 11, 2021 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.