Display WordPress Author RSS Feed on Author Pages Only


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php if (is_author()) { ?><?php $author = get_userdata(get_query_var('author')); ?><link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> - <?php echo $author->display_name; ?>" href="<?php bloginfo('url'); ?>/author/<?php echo $author->user_nicename; ?>/feed/" /><?php echo "\n"; } ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.