How to Customize RSS feed
-
I posted in the RSS section however it seems that that area is MIA when it comes to activity.
I am using Simplepie to connect two parts of my site together. My main site is running on a CMS while I have a news section which is using wordpress.
My problem is this. To display the most recent posts on the CMS I need to use Simplepie however that only shows what is on the RSS. So I went hunting for ways to edit and customize your rss feed but it seems that most guides and tutorials are regurgitated across the net and nothing really fits what I am looking for.
I am trying to get it so that my rss feed shows the first post only along with the thumbnail and snippet. Under that I would prefer to have it display 5 links to the next posts in sequence.
Basically it would look like this
Image here – Title
written by – date
TEXT SUMMARYlink to post #2
link to post #3
link to post #4
link to post#5How do I do this. I did find where I should be editing for this but nothing seems to provide instructions on how to change your css file, including adding the thumbnails
Here is what I have in there already
<channel> <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title> <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> <link><?php bloginfo_rss('url') ?></link> <description><?php bloginfo_rss("description") ?></description> <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate> <?php the_generator( 'rss2' ); ?> <language><?php echo get_option('rss_language'); ?></language> <?php do_action('rss2_head'); ?> <?php while( have_posts()) : the_post(); ?> <item> <title><?php the_title_rss() ?></title> <link><?php the_permalink_rss() ?></link> <comments><?php comments_link(); ?></comments> <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate> <dc:creator><?php the_author() ?></dc:creator> <?php the_category_rss() ?> <guid isPermaLink="false"><?php the_guid(); ?></guid> <?php if (get_option('rss_use_excerpt')) : ?> <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> <?php else : ?> <description><![CDATA[<?php the_excerpt_rss() ?>]]></description> <?php if ( strlen( $post->post_content ) > 0 ) : ?> <content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded> <?php else : ?> <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded> <?php endif; ?> <?php endif; ?> <wfw:commentRss><?php echo get_post_comments_feed_link(); ?></wfw:commentRss> <?php rss_enclosure(); ?> <?php do_action('rss2_item'); ?> </item> <?php endwhile; ?> </channel>
- The topic ‘How to Customize RSS feed’ is closed to new replies.