Error trying to show image in feeds
-
Hi everybody,
Trying to show images in feeds, I’d found the solution is to include the following code in the theme/functions.php file:add_filter(‘the_content_feed’, ‘imagen_destacada_rss’);
function imagen_destacada_rss($content) {
global $post;
if( has_post_thumbnail($post->ID) )
$content = get_the_post_thumbnail($post->ID) . $content;
return $content;
}I did it but the result is a fatal error:
Fatal error: Call to undefined function add_filter() in /home/u319349464/public_html/wp-content/themes/rositacocinillas/functions.php on line 72
Just in case it’s important, my theme is a child theme so I included the code in the child’s function.php file.
Any idea how to solve it? (actually, the objective is allways to show images in feeds!)
Thank you in advance!
- The topic ‘Error trying to show image in feeds’ is closed to new replies.