WordPress can generate feeds for individual tag and custom-taxonomy archives. To make those feeds useful, do two separate things: generate the correct URL with the native feed functions, then render a visible link on the relevant archive template (or insert it with a PHP snippet tool). Use get_tag_feed_link() for a tag, or get_term_feed_link() for a custom taxonomy term, and verify the resulting URL on your own permalink setup.
What WordPress provides automatically
WordPress includes RSS and Atom feed support. A taxonomy archive can therefore have its own feed endpoint even when the site’s general feed is not specific enough for a reader’s interests. The endpoint and the link are different: core functions return a URL, but your theme or snippet configuration must place that URL somewhere visitors can see it.
The WordPress Developer Resources feeds handbook (updated July 7, 2025) describes adding feed links in normal theme locations such as a sidebar or footer. The same principle applies to a tag or taxonomy archive: output the term-specific URL in the archive context.
Choose the implementation route
| Route | Best fit | What you change | Important limitation |
|---|---|---|---|
| Theme or template edit | You are comfortable editing PHP and want precise placement | Add conditional PHP to the tag or taxonomy archive template, or to a template part used there | A theme update can overwrite direct edits unless you use a child theme or another deployment method |
| PHP snippet tool | You want to keep the code outside the theme and control where it runs | Add the code in a snippet manager such as the workflow documented by WPBeginner (February 19, 2025), then configure its location and conditions | The tool must expose the correct archive context and execute the snippet where its HTML belongs |
Whichever route you choose, test the rendered link rather than assuming a familiar-looking URL will work. Permalink settings change the URL format.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
Add an RSS link to a tag archive
Use the tag-specific helper
On a tag archive, obtain the current tag’s ID and pass it to get_tag_feed_link(). The function can generate RSS2 (the usual default choice) or Atom output.
<?php
$tag_id = get_queried_object_id();
$feed_url = get_tag_feed_link( $tag_id, 'rss2' );
if ( $feed_url ) {
echo '<a href="' . esc_url( $feed_url ) . '">Subscribe to this tag</a>';
}
?>
Place this in the tag archive template, a template part that it includes, or a snippet location that runs for tag archives. If your implementation already has the queried tag object, you can use its ID instead of calling get_queried_object_id().
Rank #2
Use the general term helper when you need one pattern
Tags are terms too. A generic implementation can resolve the current term and call get_term_feed_link(), passing both the term ID and the actual taxonomy key:
<?php
$term = get_queried_object();
if ( $term instanceof WP_Term ) {
$feed_url = get_term_feed_link( $term->term_id, $term->taxonomy, 'rss2' );
if ( $feed_url ) {
echo '<a href="' . esc_url( $feed_url ) . '">Subscribe to this term</a>';
}
}
?>
This approach is useful when the same template serves several taxonomies, because the taxonomy name comes from the current term rather than being hard-coded.
Add an RSS link to a custom-taxonomy archive
Resolve the current term safely
For a custom taxonomy, resolve the archive’s term and pass its registered taxonomy name to get_term_feed_link(). The function accepts a term, taxonomy, and optional feed format, and returns a URL or false if it cannot resolve the request.
<?php
$term = get_term_by(
'slug',
get_query_var( 'term' ),
get_query_var( 'taxonomy' )
);
if ( $term && ! is_wp_error( $term ) ) {
$feed_url = get_term_feed_link( $term->term_id, $term->taxonomy, 'rss2' );
if ( $feed_url ) {
echo '<a href="' . esc_url( $feed_url ) . '">Subscribe to this topic</a>';
}
}
?>
The example deliberately reads the taxonomy from the current query. If you use a fixed taxonomy in your own code, replace an example such as 'topics' with your site’s registered taxonomy key—not its display label or a guessed plural.
Rank #4
Why the taxonomy key matters
WordPress identifies a custom taxonomy by its registered key. That key must match the taxonomy attached to the archive term. The register_taxonomy() reference also cautions against names that conflict with other taxonomies, post types, or reserved query variables. A mismatch can prevent term resolution or produce no feed URL.
RSS2 or Atom?
Both helpers support feed formats such as rss2 and atom. Use the format your audience’s feed client expects; if you have no reason to choose otherwise, RSS2 is a practical default for the examples above. To request Atom, change the final argument:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Best Value
$feed_url = get_term_feed_link( $term->term_id, $term->taxonomy, 'atom' );
The corresponding tag helper accepts the same format choice. A format argument changes the feed representation, not which term’s posts are included.
Understand the generated URL
The exact URL depends on the site’s permalink configuration. With plain permalinks, WordPress constructs a query-string URL using the taxonomy query variables. With pretty permalinks, it adds a feed path to the term link. Do not hard-code one pattern; inspect the URL generated on the target site.
- Open the tag or custom-taxonomy term archive in a browser.
- Inspect the rendered subscription anchor and copy its destination.
- Open that destination directly. Confirm that it returns a feed for the intended term, not a 404, the site homepage, or an unrelated archive.
- If you changed rewrite or taxonomy settings, save the site’s permalink settings again and repeat the check.
Make the link visible and usable
- Put the link near the archive title, description, or other archive controls so it is discoverable.
- Use descriptive text such as “Subscribe to this tag” or “Subscribe to this topic,” rather than an unlabeled icon alone.
- Escape the generated URL with
esc_url()before output. - Only print the anchor after confirming both the term and feed URL are valid.
Generating a valid endpoint without rendering an anchor does not give visitors a subscription control. Conversely, rendering an anchor to a guessed URL does not guarantee a working feed.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Optional URL filtering for developers
The taxonomy_feed_link hook applies to taxonomies other than the built-in category and post_tag taxonomies. It exposes the feed argument, including values such as rss2 and atom, so developers can filter a generated URL when a project has a specific routing requirement. Most site owners do not need this hook merely to display a standard term feed.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Troubleshoot a missing or broken subscription link
The link does not appear
- Confirm the code runs on the archive template or snippet location that actually renders the page.
- Check the archive condition in your snippet tool; a taxonomy-term page is not necessarily a tag page.
- Verify that the term lookup did not return a
WP_Erroror an empty value.
The function returns false
- Check that the term exists.
- Check that the taxonomy key is the one registered for that term.
- Check that the term ID and taxonomy are passed in the correct order to
get_term_feed_link().
The URL opens a 404 or the wrong page
- Inspect the actual generated URL instead of substituting a remembered pattern.
- Review the site’s permalink and rewrite configuration, then resave permalink settings if appropriate.
- Ensure the taxonomy registration does not use a name that conflicts with a reserved query variable or another content type.
The feed loads but contains unexpected posts
Recheck the archive term and taxonomy passed to the helper. A generic term ID without the matching taxonomy can resolve the wrong context, especially on sites with similarly named terms in multiple taxonomies.
Quick Recap
Practical decision checklist
- One tag template: use
get_tag_feed_link()with the queried tag ID. - Several taxonomies or a reusable component: use
get_term_feed_link()with the current term’s ID and taxonomy. - Precise visual placement and code access: edit a child-theme template or template part.
- No theme editing or need for conditional placement: use a PHP snippet tool and configure its execution context.
- Any implementation: escape the URL, render a visible anchor, and open the generated destination to verify it.
References
- WordPress Developer Resources, “WordPress Feeds – Advanced Administration Handbook,” updated July 7, 2025.
- WPBeginner, “How to Add RSS Subscription for Tags and Custom Taxonomy Archives,” February 19, 2025.
- WordPress Developer Resources, “get_term_feed_link() – Function.”
- WordPress Developer Resources, “taxonomy_feed_link – Hook.”
- WordPress Developer Resources, “register_taxonomy() – Function.”
- WordPress Developer Resources, “get_tag_feed_link() – Function.”
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

