WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Function wp_get_attachment_image() does not exist in 2.5! (7 posts)

  1. candreu
    Member
    Posted 6 years ago #

    After upgrading WordPress 2.3.3 to 2.5, the Media Library says this:

    Fatal error: Call to undefined function wp_get_attachment_image() in /home/distrito/public_html/wp-includes/post-template.php on line 386

    Why I haven't the wp_get_attachment_image() function?

  2. nielsgoedvolk
    Member
    Posted 6 years ago #

    I have the exact same problem. Does anybody know how to fix this?

  3. nielsgoedvolk
    Member
    Posted 6 years ago #

    My exact error is:

    Fatal error: Call to undefined function: wp_get_attachment_image() in /srv/goedvolk/www/www.anthonievandiemenstam.nl/wp-includes/post-template.php on line 386

    I uploaded the installation files again to see if that fixes the problem, but the error remains the same. I don't know if it is caused by a plugin, because I haven't tested the media library before I activated the plugins (tested only the frontpages).

    Can't find anything in the forums about this subject.

  4. nielsgoedvolk
    Member
    Posted 6 years ago #

    Found the answer in the FAQ:

    Q. When in the Media Library, what is this error -- Fatal error
    Call to undefined function: wp_get_attachment_image() in /home/public_html/wp-includes/post-template.php on line 384 :
    This is usually caused by a PHP file not being correctly uploaded. Make sure wp-includes/media.php and wp-settings.php are intact (reupload them).

    This worked for me!

  5. inesz
    Member
    Posted 6 years ago #

    Had same problem and didn't found it in the FAQ :(. Fixxed as nielsgoedvolk described. Thannkkkkss!

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Almost all "Call to undefined function" errors are the result of not uploading all of the WordPress files.

    You have to upload ALL of them. They are not optional.

  7. candreu
    Member
    Posted 6 years ago #

    OK, I uploaded all the files and there's no error now. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic