« Return to Thread: Linking stylesheet to RSS feeds

Re: Linking stylesheet to RSS feeds

by RePost :: Rate this Message:

Reply to Author | View in Thread

Austin Matzko wrote:

> On Tue, Jun 16, 2009 at 2:46 AM, RePost <repost_08@...> wrote:
>  
>> I'd like to style my WordPress feed. Can I style the feed? How can I style the feed? Inline, you say? How can I add inline styles to my feed?
>>    
>
> You could make inline markup changes to your feed by conditionally
> attaching a callback filter to "the_content", etc., whenever is_feed()
> returns true:
>
> if ( is_feed() ) {
>    add_filter('the_content', 'my_rss_markup_replace');
> }
>
> [snip]
>
> function my_rss_markup_replace($content = '')
> {
>    return preg_replace('#(<img[^>]*>)#', '<div
> style="margin:10px;">$1</div>', $content);
> }
> _______________________________________________

Interesting idea, Austin. I'll knock it around.

For the time being, I'm going with custom feeds for the important stuff
and will consider dialing back the lesser feeds from RSS2 to RSS. No
problem with bumping graphics there, but no media enclosures, either.


_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

 « Return to Thread: Linking stylesheet to RSS feeds