get_tag_feed_link

Retrieves the permalink for a tag feed.

Description

(string) get_tag_feed_link( (int) $tag_id, (string) $feed = '' ); 

Returns (string)

The feed permalink for the given tag.

Parameters (2)

0. $tag_id (int)
The tag id.
1. $feed — Optional. (string) => ''
Feed type. Default empty.

Usage

  1. if ( !function_exists( 'get_tag_feed_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/link-template.php'; 
  3.  
  4. // The tag id. 
  5. $tag_id = -1; 
  6.  
  7. // Optional. Feed type. Default empty. 
  8. $feed = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = get_tag_feed_link($tag_id, $feed); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/link-template.php  
  1. function get_tag_feed_link( $tag_id, $feed = '' ) { 
  2. return get_term_feed_link( $tag_id, 'post_tag', $feed );