• Resolved copc

    (@copc)


    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)
  • 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.

    Had the same error, but your code worked for me as well, thanks!

    I have fixed this issue on Flat 1.5.7
    Thanks

    Thread Starter copc

    (@copc)

    Thank you codeofalice that worked!

    Thank you, your code works!

    Thanks !

    @yoarts, when will it be released in wordpress extension manager ?

    После обновления все исчезло, ничего нет,Я предполагала, что когда создатель обновит шаблон исправит эту ошибку, а ошибка превратилась в проблему, кто решил у себя эту проблему,,Помогите!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error’ is closed to new replies.