Filter certain content from post for RSS feed (2 posts)

  1. Homemade
    Posted 8 years ago #


    I'm using javascript within my posts, and this displays within the RSS feed - which is not what people want to be seeing.

    Is there a way of filtering this out? And is there a way to filter out content by id or class? Perhaps there's a tag which makes content invisible to RSS readers?

    Thanks for any help


  2. Homemade
    Posted 8 years ago #

    OK, I've had a thought...

    According to this site - http://interglacial.com/~sburke/stuff/pretty_rss.html - you can apply CSS to RSS...

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="http://yourserver.com/path/rss.css"?>

    ...and therefore to hide content from RSS I could do something like..

    .hideMe { display: none }

    Firstly, where would I implement the first bit in my wordpress templates?
    Secondly, does this sound like a good approach?


Topic Closed

This topic has been closed to new replies.

About this Topic