Displays the permalink to the post for use in feeds.
Source
function the_permalink_rss() {
/**
* Filters the permalink to the post for use in feeds.
*
* @since 2.3.0
*
* @param string $post_permalink The current post permalink.
*/
echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) );
}
Hooks
- apply_filters( ‘the_permalink_rss’,
string $post_permalink ) Filters the permalink to the post for use in feeds.
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |
Add Google Analytics campaign tracking to RSS permalinks
The following example appends GA query variables to permalinks, to track clicks from a site’s RSS feed to the site itself.