Title: Fatal error
Last modified: August 22, 2016

---

# Fatal error

 *  Resolved [copc](https://wordpress.org/support/users/copc/)
 * (@copc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/)
 * Help, tried to install template, it get this on home page right away.
 * Fatal error
    : Call to undefined function flat_hook_page_before() in /home/########/
   wp-content/themes/flat/page.php on line 2

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [codeofalice](https://wordpress.org/support/users/codeofalice/)
 * (@codeofalice)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802527)
 * I had the same issue, and this is how I fixed it:
 * Go to Appearance > Editor in your admin panel.
 * For the Flat Theme, go to `hooks.php`.
 * Under the `<?php` line, add the following code:
 *     ```
       function flat_hook_page_before() {
       	do_action( 'flat_page_before' );
       	do_action( 'tha_page_before' );
       }
   
       function flat_hook_page_after() {
       	do_action( 'flat_page_after' );
       	do_action( 'tha_page_after' );
       }
   
       function flat_hook_page_top() {
       	do_action( 'flat_page_top' );
       	do_action( 'tha_page_top' );
       }
   
       function flat_hook_page_bottom() {
       	do_action( 'flat_page_bottom' );
       	do_action( 'tha_page_bottom' );
       }
       ```
   
 * and update the file. It should fix the error.
 * I assume that when the creator updates the template, they’ll probably fix this
   bug, but now I don’t have the error anymore.
 *  [rhsaldana@gmail.com](https://wordpress.org/support/users/rhsaldanagmailcom/)
 * (@rhsaldanagmailcom)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802533)
 * Had the same error, but your code worked for me as well, thanks!
 *  [YoArts](https://wordpress.org/support/users/yoarts/)
 * (@yoarts)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802537)
 * I have fixed this issue on Flat 1.5.7
    Thanks
 *  Thread Starter [copc](https://wordpress.org/support/users/copc/)
 * (@copc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802549)
 * Thank you codeofalice that worked!
 *  [algore87](https://wordpress.org/support/users/algore87/)
 * (@algore87)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802565)
 * Thank you, your code works!
 *  [Toilal](https://wordpress.org/support/users/toilal/)
 * (@toilal)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802586)
 * Thanks !
 * [@yoarts](https://wordpress.org/support/users/yoarts/), when will it be released
   in wordpress extension manager ?
 *  [Susanna259](https://wordpress.org/support/users/susanna259/)
 * (@susanna259)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802619)
 * После обновления все исчезло, ничего нет,Я предполагала, что когда создатель 
   обновит шаблон исправит эту ошибку, а ошибка превратилась в проблему, кто решил
   у себя эту проблему,,Помогите!!!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Fatal error’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/flat/1.7.11/screenshot.png)
 * Flat
 * [Support Threads](https://wordpress.org/support/theme/flat/)
 * [Active Topics](https://wordpress.org/support/theme/flat/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/flat/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/flat/reviews/)

 * 7 replies
 * 7 participants
 * Last reply from: [Susanna259](https://wordpress.org/support/users/susanna259/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-1520/#post-5802619)
 * Status: resolved