WordPress.org

Ready to get started?Download WordPress

Forums

Fatal Error (12 posts)

  1. euronest
    Member
    Posted 2 years ago #

    I have the below error showing on 3 pages on my website.

    Fatal error: Call to undefined function: the_block() in /homepages/14/d301571190/htdocs/wp-content/themes/euronest/page.php on line 15

    I am new to WordPress so I apologize if this is an easy fix!

  2. adpawl
    Member
    Posted 2 years ago #

    try reupload your theme

  3. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Where did you get the Euronest Theme?

  4. euronest
    Member
    Posted 2 years ago #

    How do I reupload the theme????

    the theme was custom for us by Craig Snyder

    custom theme designed by RiverBrand and Built by ElectricFusion.com, LLC.

  5. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    You'll either need to contact the developer, or else post the code somewhere for us to be able to review it.

    The problem is that the Theme calls a function, the_block(), which isn't defined. But what that function is supposed to be, why the Theme calls it, and where it's supposed to be defined are questions that are impossible to answer without seeing the actual code.

  6. euronest
    Member
    Posted 2 years ago #

    Im sorry this is so dumb, but Where can I find the Code? the FTP Server? or do I need to get it from the developer?

  7. euronest
    Member
    Posted 2 years ago #

    [ 131 lines of code moderated. For more than 10 lines of code please pastebin.com instead. ]

  8. euronest
    Member
    Posted 2 years ago #

    Is that the code?

  9. hattendesign
    Member
    Posted 2 years ago #

    If the function is not important to you, simply go to the theme editor under "appearance" > "editor"

    Click on the "Header" template to the right and put this at the beginning.. (the absolute first line)

    <?php function the_block() { echo "<!-- this function is on header.php -->"; } ?>

    This is not optimal but it will get rid of the error.
    I'm guessing this was a wp shortcode from the theme

  10. euronest
    Member
    Posted 2 years ago #

    What do you mean if the function is not important to me? what will change by adding that?

  11. hattendesign
    Member
    Posted 2 years ago #

    the_block() is a custom function from a plugin or your current theme. If you google it, it seems to be related to a plugin called "Multiple content blocks" but I'm not sure (check to see if you have a plugin with that name, it might be disabled).

    You are getting the error because there is a page on your theme trying to access a custom function which does not exist.

    The fix I posted, creates a function the_block() thus eliminating the error. My fix simply outputs some invisible text whenever the theme tries to access the function.

    Other than that, you'll need to contact a developer to take a deeper look.

    Best of luck.

  12. Lenesi76
    Member
    Posted 1 year ago #

    I had this problem. It was indeed "Multiple content blocks" and when I checked in Plugins it was deactivated for some reason. I activated it again and the content displayed again.

    Hope that helps someone.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags