Agregar una miniatura del post a nuestro RSS Feed
Archivado en wordpress :: Por aldols :: junio 21, 2010 ::
![]()
Si quieres darle una mejor vista a tus feeds, puedes agragar una miniatura del post al feed de tu blog. La forma es sencilla, solo tienes que editar el archivo funtions.php de tu theme y agregar el siguiente codigo. Las miniaturas seran visibles en cuanto guardes el archivo.
1 2 3 4 5 6 7 8 9 | function diw_post_thumbnail_feeds($content) { global $post; if(has_post_thumbnail($post->ID)) { $content = '<div>' . get_the_post_thumbnail($post->ID) . '</div>' . $content; } return $content; } add_filter('the_excerpt_rss', 'diw_post_thumbnail_feeds'); add_filter('the_content_feed', 'diw_post_thumbnail_feeds'); |
Via | WpRecipes























