title: WORDPRESS: Trying to follow steps in a tutorial but Fatal Error warning pops up
body: <h2>==ISSUES HAVE BEEN SOLVED==</h2>
  
  <p>I am trying to follow the steps within this tutorial//</p>
  
  <p><a href="http://tatiyants.com/how-to-use-wordpress-custom-post-types-to-add-events-to-your-site/" rel="nofollow">http://tatiyants.com/how-to-use-wordpress-custom-post-types-to-add-events-to-your-site/</a></p>
  
  <p>But I've come across a <code>Fatal Error</code> after step 2.</p>
  
  <p><code>
  Fatal error: Call to undefined function format_date() in /functions.php on line 134</code></p>
  
  <p><strong>Error Line//</strong><br>
  <code>echo format_date($custom["event_date"][0]) . '&lt;br /&gt;&lt;em&gt;' .</code></p>
  
  <p><strong>Content currently in Functions.php//</strong>
  <a href="http://pastebin.com/FvqvE187" rel="nofollow">http://pastebin.com/FvqvE187</a></p>
  
  <p>What exactly is the issue?
  &amp;How can I fix this?</p>
  
  <h1>EDIT//</h1>
  
  <p>Added 
  <code>function format_date($unixtime) {
  return date("F", $unixtime)." ".date("d", $unixtime).", ".date("Y", $unixtime);
  }</code>
  to my functions.php to fix the <code>Fatal Error</code> another issue occurred.</p>
  
  <p>Before the error,  in the post edit screen there was a <code>Event Detail</code> Metabox. But after this change the box isn't there any more. It allowed me to add Locations and Times ect. Now I have no way to add this extra information. 
  It's clear the new code caused this but why?</p>
  
  <h1>EDIT2//</h1>
  
  <p>The answer to my 1st edit was simply adding the rest of the code (input boxes ect)
  After adding the rest of the code this error pops up within the <code>Event Detail</code> metabox.</p>
  
  <p><code>Fatal error: Call to undefined function format_date() in /functions.php on line 172</code></p>
  
  <p>This is line <code>172</code>//</p>
  
  <pre><code>$ret = '&lt;p&gt;&lt;label&gt;Date: &lt;/label&gt;&lt;input type="text" name="event_date" value="' . format_date(get_event_field("event_date")) . '" /&gt;&lt;em&gt;(mm/dd/yyy)&lt;/em&gt;';
  </code></pre>
  
  <h1>EDIT3//</h1>
  
  <p>All I had to do was remove <code>format_date</code> from line <code>172</code> and also remove one of the parentheses at the end. Doing that enables the Event Details again :)</p>