WordPress.org

Ready to get started?Download WordPress

Forums

Simple Nivo Slider
Fatal error: Call to undefined function has_post_thumbnail() (4 posts)

  1. SRD75
    Member
    Posted 2 years ago #

    If I turn PHP error reporting on in .htaccess, I see the error:

    Fatal error: Call to undefined function has_post_thumbnail() in /wp-content/plugins/simple-nivo-slider/simple-nivo-slider.php on line 229

    I am using WordPress 3.2.1 and have just installed the latest version of Simple Nivo Slider, which is v0.5.6.

    After it is installed, I configure it to display 3 blog posts of category "Image" each containing an image with dimensions 960 x 304. None of theses posts have post titles - the title is blank, as I don't want any text to display.

    The slider does not display at all. The source code shows it is being included okay.

    The plugin page at WordPress.org says it is compatible with WP v3.2.1.

    http://wordpress.org/extend/plugins/simple-nivo-slider/

  2. SRD75
    Member
    Posted 2 years ago #

    Turns out my custom theme had no support for thumbnails.

    I added add_theme_support('post-thumbnails'); to the theme's functions.php file. I no longer receive PHP errors, but the slider still does not display.

    The slider div is empty:

    <div id="slider">
    </div>
  3. SRD75
    Member
    Posted 2 years ago #

    There are no other jquery sliders or jquery plugins installed.

    The head section of the front end has the following related code:

    <script type='text/javascript' src='http://www.example.com/wp-includes/js/l10n.js?ver=20101110'></script>
    <link rel='stylesheet' id='nivo-slider-css'  href='http://www.example.com/wp-content/plugins/simple-nivo-slider/nivo-slider/nivo-slider.css?ver=3.2.1' type='text/css' media='all' />
    <link rel='stylesheet' id='simple-nivo-slider-css'  href='http://www.example.com/wp-content/plugins/simple-nivo-slider/styles.css?ver=3.2.1' type='text/css' media='all' />
    
    <script type='text/javascript' src='http://www.example.com/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
    <script type='text/javascript' src='http://www.example.com/wp-content/plugins/simple-nivo-slider/nivo-slider/jquery.nivo.slider.pack.js?ver=3.2.1'></script>
  4. SRD75
    Member
    Posted 2 years ago #

    As in this post, the js file: /wp-content/plugins/simple-nivo-slider/nivo-slider/jquery.nivo.slider.js was not being called. Adding it manually to header.php did not resolve the issue, while it did in the above post.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic