• Resolved digitalcam

    (@digitalcam)


    I am using TwentyFourteen and a child theme and on my search results page

    https://andrehess.com/wps/?s=test+post

    I’m getting the following error

    Notice: Undefined variable: img in /home/andrehes/public_html/wps/wp-content/themes/ion/functions.php on line 68

    I’ve used this child theme on several other sites and have never encountered this message.

    Any idea why it’s showing up?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter digitalcam

    (@digitalcam)

    This is the function in question

    function excerpt_thumbnail( $excerpt ){
        if( is_single() ) return $excerpt;
        global $post;
        if ( has_post_thumbnail() ) {
            $img .= '<a href="'.get_permalink($post->ID).'">'.get_the_post_thumbnail($post->ID, 'custom_thumb').'</a>';
        } else {
            $img = '';
        }
        return $img.$excerpt;
    }
    Thread Starter digitalcam

    (@digitalcam)

    Resolved

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error on Search Results Page’ is closed to new replies.