9.3. Publishing Your Feed

Now that you have a functional RSS feed for your blog, you need to make it available to your users, so they can take advantage of your syndicated content.

9.3.1. Adding the Feed to the Blog

To make your feed available to users, add it to your blog by including it within index.php. You can do this in either of two ways (I'll show you how to use both approaches). First, you can add a <link> tag in the head of your HTML. Alternatively, you can place a direct link to the feed within the body of your document.

9.3.1.1. Using the <link> Tag to Signify an RSS Feed

Most modern browsers have RSS readers built in, so they recognize when a site has an available RSS feed. To make your feed recognizable, you need to add a <link> ...

Get PHP for Absolute Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.