Forums
Home / Theme: Twenty Fourteen / Error on Search Results Page
(@digitalcam)
8 years, 10 months ago
I am using TwentyFourteen and a child theme and on my search results page
http://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!
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; }
Resolved