Saturday 19 March 2016

How to Add feed links (instead of old RSS code in head)

This one is simple. If you’ve been building WordPress themes for a while, you’ll remember the days when you had to manually include code to output the RSS feed right in the header.php. This approach is cleaner and relies on the wp_head()

action hook to output the necessary code.

In the functions.php file, include the following:

// Adds RSS feed links to for posts and comments.
add_theme_support( 'automatic-feed-links' );

Make sure that you have it in the header.php, right before end of &rgt;/head&lgt;

1 comment:

  1. Create a Company profile on findoble.com 100% free, and get high rating & reviews of your company.
    findoble is best blogger and reviews portal in world

    ReplyDelete

Popular Articles