Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Añade la imagen destacada al RSS
- * Este tema no necesita esta feature, ya que al no incluir en la pagina
- * de post la featured image la he de poner a mano
- */
- function imagenDestacadaEnRSS($content) {
- global $post;
- if ( has_post_thumbnail( $post->ID ) ){
- $content = get_the_post_thumbnail( $post->ID, 'thumbnail',
- array( 'style' => 'float: left; margin-right: 15px; margin-bottom: 15px;' ) ) . $content;
- }
- return $content;
- }
- add_filter('the_excerpt_rss', 'imagenDestacadaEnRSS');
- add_filter('the_content_feed', 'imagenDestacadaEnRSS');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement