WordPress.org

Ready to get started?Download WordPress

Forums

RSS feed from search results - what's the template code? (2 posts)

  1. Joss Winn
    Member
    Posted 5 years ago #

    I'd like to allow visitors to easily grab an rss feed from any search query on my site. I see that wordpress.com are doing it (and providing JSON output, too). I assume it would use this function:

    http://codex.wordpress.org/Function_Reference/get_search_feed_link

    But I don't know how to take that and make it available in any chosen theme for visitors to use.

    Can anyone help? Thanks.

  2. ericr23
    Member
    Posted 5 years ago #

    You can add "&feed=rss2" to the search URL (after "?s=term"). That's what get_search_feed_link() does, which I sussed out thanks to your tip of where to look.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.