[wp-hackers] Linking stylesheet to RSS feeds

Joost de Valk joost at yoast.com
Wed Jun 17 06:27:43 GMT 2009

Disclaimer: I didn't follow this thread entirely, so sorry if I say 
something that's already been said.

Wouldn't it be cool if WordPress automatically replaced 
class="alignright" and "alignleft" etc with good inline CSS? That's 
always annoyed me a bit... Might make a plugin for that, since it's 
actually pretty darn easy to do, but still, shouldn't that be in core?


RePost wrote:
> Austin Matzko wrote:
>> On Tue, Jun 16, 2009 at 2:46 AM, RePost <repost_08 at yahoo.com> 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 at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers 

*Joost de Valk*
SEO & Web Development (Magento & WordPress)
OrangeValley <http://www.orangevalley.nl> & Yoast <http://yoast.com>
E: joost at orangevalley.nl <mailto:joost at orangevalley.nl> - 
joost at yoast.com <mailto:joost at yoast.com>
T: +31624555808 | @yoast <http://twitter.com/yoast> on Twitter
W: http://yoast.com/

More information about the wp-hackers mailing list