Adding feed links
WordPress automatically generates even the feed links that you see in the preceding screenshot, so you don't have to type them in or remember what they are for. If you're using an existing theme, there's a good chance it's already got the feed links in it, in which case you can skip the following section. If it doesn't, or if you want to learn more about adding feed links to your own templates, continue on here!
You can use handy built-in WordPress functions to add feeds to your theme. Actually, this is something we have partially done in the previous chapter. Just to remind you what I'm talking about, we used the following code to enable feed links in the <head>
section of our custom theme. The following code was placed in the functions.php
file of our theme:
functionckitchen_setup() { //Adds RSS feed links to <head> for posts and comments. add_theme_support('automatic-feed-links'); /* other code */ } add_action('after_setup_theme', 'ckitchen_setup'...