Title: Fatal error with general-template.php
Last modified: August 19, 2016

---

# Fatal error with general-template.php

 *  [sciencequeen](https://wordpress.org/support/users/sciencequeen/)
 * (@sciencequeen)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-with-general-templatephp/)
 * I should start with some back story of how I arrived at this problem:
 * I wanted to change my calendar widget in my theme to show posts by year, rather
   than by month. After searching through the forums and google indexing, I found
   that it required a modification to the general-template.php file in the wp-includes
   folder.
 * Since I am not a programmer (or know how to use php!) at all, I decided that 
   I would copy over the original document’s contents into a .txt file so that in
   case I buggered up the general-template.php file, then I could just copy the 
   contents from the .txt file and paste it back into the general-template.php file
   and have the original working contents back!
 * I did bugger up the file, and so I pasted the .txt file contents back into the
   general-template.php file, but then it _still did not work_.
 * I then tried to unzip the **original** file from the zipped wordpress file and
   then copy that one over to the file stored on my server via ftp, but that also
   did not work.
 * This is the error I am getting:
 * Fatal error: Call to undefined function home_url() in /var/home/steph/sites/www.
   sciencequeen.com/juiceboxmixes/wp-includes/general-template.php on line 407
 * I searched this error in the wordpress forums here and I also tried the google
   site indexing thing again, and still no solution. I sent a message to my friend
   that installed the wordpress onto my server, since he would likely be able to
   help, except he has a full-time job and a 5-year-old and has better things to
   do than listen to me bitch about something he just installed for me a few days
   ago. 🙁 (he does me the favour of hosting it – I don’t pay him very much)
 * I even went so far as to download a php editor to see what this “line 407” business
   was all about, and all it shows is:
 * $output = home_url();
 * I don’t know what it is referring to! The error above to me _sounds like_ it’s
   referencing something that does not exist, but I don’t know WHY it does not exist,
   or how to make it “come back”??
 * **Any help or insight would be much appreciated!!**
 * Also, though I have access to the files on my server via ftp, I don’t have access
   to the programs/control panel etc for where the wordpress was installed through.

The topic ‘Fatal error with general-template.php’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [general-template.php](https://wordpress.org/support/topic-tag/general-template-php/)
 * [home_url](https://wordpress.org/support/topic-tag/home_url/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [sciencequeen](https://wordpress.org/support/users/sciencequeen/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-with-general-templatephp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
