I just downloaded and installed XAMPP 5.6.15. I then downloaded and unzipped WordPress 4.4 into the c:\xampp\htdocs\ folder.
I go into the XAMPP control panel and start Apache, then I start MySQL. They both seem to start fine. If I then enter http://localhost at this point in my browser, I am able to get to the XAMPP screen.
I'm trying to create a simple WordPress blog for a client. So I created an HTML file, that I renamed to index.php. I then have a header.php file in the same folder. Oh, and by the way, the folder, called /eztile, is found here: c:\xampp\htdocs\wordpress\wp-content\themes\.
I then attempted to open the index.php file within the browser by entering the following in the address bar of my browser:
I immediately received the following error:
Fatal error: Call to undefined function get_header() in C:\xampp\htdocs\wordpress\wp-content\themes\eztile\index.php on line 21
Here's the top code of my index.php file:
- Code: Select all
<title>EZ Tile and Marble | Home</title>
<meta name="description" content="EZ Tile and Marble">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/slider.css">
<!--[if lt IE 9]>
<?php get_header(); ?>
<p><img src="img/slider_holder.png" width="950" height="300" /></p>
<!-- MAIN CONTENT DIVIDER -->
And here's the code for my header.php file:
- Code: Select all
<!-- HEADER/NAV AREA -->
<header id="top-bar" class="clear">
<a href="index.html"><img src="img/logo.png" width="250" height="195" /></a>
<li><a href="about-us.html">About Us <span class="arrow">▼</span></a>
<li><a href="why-ez-tile-and-marble.html">Why EZ Tile & Marble</a></li>
<li><a href="things-to-consider.html">Things To Consider</a></li>
<li><a href="quote-request.html">Quote Request <span class="arrow">▼</span></a>
<li><a href="stone-types.html">Stone Types & Edges</a></li>
<li><a href="project-estimation-form.html">Project Estimation Form</a></li>
<li><a href="granite-colors.html">Granite Colors</a></li>
<li><a href="portfolio.html">Portfolio <span class="arrow">▼</span></a>
<li><a href="project-inspiration.html">Project Inspiration</a></li>
<li><a href="blog.html">Blog <span class="arrow">▼</span></a>
<li><a href="countertop-and-tile-installation.html">Countertop and Tile Installation</a></li>
<li><a href="blanco-sinks.html">Blanco Sinks</a></li>
<li><a href="stone-remnants.html">Stone Remnants</a></li>
<li><a href="contact-us.html">Contact Us</a></li>
I know that some people have had this issue when they've modified and/or changed/moved the index.php file within /wordpress. I have not moved and/or modified any of the files. NONE.
So, out of curiosity, I thought I'd try to see if I could go into any of the free themes that come with WordPress 4.4 (twentysixteen, twentyfifteen, twentyfourteen). I tried each and received the same error:
Fatal error: Call to undefined function get_header() in C:\xampp\htdocs\wordpress\wp-content\themes\twentysixteen\index.php on line 17
If I try twentyfifteen or twentyfourteen, just replace twentyfifteen or twentyfourteen in the line above.
I don't know where else to go or what to do at this point! I've got to get this going for my client. I want to be able to design, develop, and test this on my local machine.
What else can I do? I'm hoping someone here with more experience (and XAMPP/Apache/PHP/WordPress knowledge) will be able to help me.
After posting this, I realized something when doing a little more research. To call my header, should I be just doing a simple include? That's really all I want to do? Or is the get header() the right thing to do to call up the menu on each page? Same with footer.