the_permalink_rss()
Display the permalink to the post for use in feeds.
Description Description
Source Source
File: wp-includes/feed.php
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() ) );
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
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.
add_filter('the_permalink_rss', 'rss_campaign_tracking'); function rss_campaign_tracking($post_permalink) { return $post_permalink . '?utm_source=rss-feed&utm_medium=rss&utm_campaign=feed'; };