Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Instead of building the link myself, I was wondering if wordpress has a function which generates a link to a given feed, be it a taxonomy, term, or post type. Perhaps it might even generate the little feed icon.

Before building it myself, it occurred to me they probably have a function. But my research turns up nothing.

share|improve this question

1 Answer 1

For terms and taxonomies use get_term_feed_link:

"Returns a link to the feed for all posts in a given term. A specific feed can be requested or left blank to get the default feed."

See also get_tag_feed_link and get_category_feed_link.

For post types see get_post_type_archive_feed_link.

These functions are located in in wp-includes/link-template.php.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.