re-formatting captions for RSS feed only
-
I have my RSS feeds up and running (http://www.expressnightout.com/feed) as desired — except for one thing. The captions 1. look like the rest of the text; 2. except they are too wide when viewed in a reader.
Here’s an example of the image/caption code as it appears live (both on regular posts and in the RSS feed):
<div id=”attachment_36442″ class=”wp-caption aligncenter” style=”width: 580px”><img class=”size-full wp-image-36442″ title=”Maron” src=”http://www.expressnightout.com/wp-content/uploads/2011/10/Maron.jpg” alt=”” width=”570″ height=”380″ /><p class=”wp-caption-text”>Marc Maron broadcasts the “WTF” podcast out of his garage studio, affectionately dubbed the Cat Ranch, in Los Angeles.</p></div>
The reason it’s too wide (I think?) is that the the width is designated inline, so the RSS obeys.
And I believe I can style the RSS feed captions — I just want to make them smaller and bolder than the rest of the text — by adding inline tags … somewhere.
Right now, I’m not filtering the_content for the feed. It works exactly as I want, except for the captions.
<?php if ( strlen( $post->post_content ) > 0 ) : ?>
<description><![CDATA[<?php the_content() ?>]]></description>My guess is that I need to create or modify a filter that will remove the width inline style and add the caption inline styles.
I can’t figure out where to begin. Or perhaps there is another way?
Thank you all for your time!
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘re-formatting captions for RSS feed only’ is closed to new replies.