WordPress permalink_comments_rss() Function

Beginner
5 min read
Updated: Nov 2026
3 examples
Template tag

Definition

permalink_comments_rss() is an old template tag that was used in comments feed templates to print a link for the post. It is not part of current WordPress core.

Today you use comments_link_feed() in a feed, or post_comments_feed_link() on a normal page. This page shows how to stay safe with old themes and what to use instead.

Syntax

If an old theme still calls it, guard the call. For new code, use the modern functions.

WordPress
if ( function_exists( 'permalink_comments_rss' ) ) {
  permalink_comments_rss();
}

comments_link_feed();
post_comments_feed_link( 'Comments RSS' );
CallWhat it does
permalink_comments_rss()Old tag. Not available in current WordPress. Check with function_exists() first.
comments_link_feed()Prints the comments link of the current post inside a feed.
post_comments_feed_link( 'Comments RSS' )Prints a link to the comments feed of the current post.

get_post_comments_feed_link() returns the URL of the comments feed as a string.

Full declaration
WordPress
permalink_comments_rss(): void  // legacy tag, not in current WordPress core

Parameters

ParameterDescription
NoneThe old tag had no parameters. Its modern replacements are listed in the table above.

Return Value

Return ValueDescription
voidThe old tag printed a URL. If it does not exist on your site, calling it causes a fatal error.

WordPress Examples

Three short theme examples. Each one has a sample output.

Example 1 — Safe call

Call an old tag only if it exists.

WordPress
<?php
if ( function_exists( 'permalink_comments_rss' ) ) {
  permalink_comments_rss();
}
?>

How It Works

  1. function_exists() checks that the function is defined.
  2. On current WordPress the check is false.
  3. No error happens and the page keeps working.

Example 2 — In a comments feed

Use comments_link_feed() in a feed item.

WordPress
<item>
  <link><?php comments_link_feed(); ?></link>
</item>

How It Works

  1. comments_link_feed() prints an XML-safe URL.
  2. It points to the comments of the current post.
  3. Use it only in feed templates.

Frequently Asked Questions

No. It is an old tag that is not in current WordPress core. Use the modern functions.
Use comments_link_feed() inside a feed template.
Use post_comments_feed_link() on a single post.
Use get_post_comments_feed_link().
Wrap the call in function_exists(), or replace it with a modern function.

Next: previous_comments_link()

Print the link to the previous page of comments.

previous_comments_link() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful