WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function: has_post_thumbnail() (7 posts)

  1. caligrafx
    Member
    Posted 3 years ago #

    I have recently installed a theme that will not let me view a post details. I can see the title and the keywords and breadcrumbs but the details show this error below. Any help will be greatly appropriated.

    Fatal error: Call to undefined function: has_post_thumbnail() in /archive-blog.php on line 32

    Thanks,
    Adam

  2. caligrafx
    Member
    Posted 3 years ago #

    So, if I remove the line 32 it just moves the error to the function page. Can someone please help me!

    I did some research and found out that this is a blog that occurs with the facebook, like button, but I don't have the plugin on my site.

    Thanks,
    Adam

  3. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Are you sure that you are running WP 3.0.1?

  4. caligrafx
    Member
    Posted 3 years ago #

    Yes.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    has_post_thumbnail() is a standard WP 3.0 template tag:
    http://codex.wordpress.org/Function_Reference/has_post_thumbnail

    Try switching to the TwentyTen theme and see if that helps.

  6. Jonathan Brinley
    Member
    Posted 3 years ago #

    Your theme has to call add_theme_support('post-thumbnails') in an after_setup_theme action. Otherwise the post-thumbnail functions aren't included. See the TwentyTen theme for an example of how it's done.

  7. Bradley Jacobs
    Member
    Posted 3 years ago #

    I had this issue too, but the above solution worked for me. I am making use of the feature in a plug-in and added the above code to get everything working again.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.