简体   繁体   中英

Custom WordPress theme showing index.php items in functions.php page

I'm following a video tutorial to convert a custom HTML template into a WordPress website. I copied my files into the themes folder and have renamed my files properly according to WordPress standards. Whilst I managed to get WordPress recognise my theme through edits in style.css , when I launch the website, I got a blank page.

I have an index.php filled with my front page code and a blank functions.php page. When I visit the the website at localhost/wordpress/ , I got a blank page. When I open localhost/wordpress/functions.php , I got all the stuff.

I've searched online for solutions but still got no luck. I've also tried the debugging code, but I don't see any issue with my PHP code because I only had <?php get_header(); ?> <?php get_header(); ?> and <?php get_footer(); ?> <?php get_footer(); ?> in my code.

What could possibly go wrong?

You can try to rename index.php to front-page.php, and leave a blank index.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM