A Quick Tip For WordPress Theme Authors
nobrainer nailed me a couple of days ago for not having auto-discoverable feeds on my site. The process for adding them to your WordPress is a rather simple one.
Add the following code to your document's <head> section (usually header.php in WP themes):
-
-
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
-
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
-
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
-
<?php if (is_single() or is_page()) { ?>
-
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
-
<?php } ?>
-
This will alert RSS/Atom-aware browsers of the presence of your RSS, RSS2 and Atom (0.3) feeds. The last portion of the code will alert pingback-aware blogging apps of the pingback URL on each of your pages/posts so that authors linking to your content will automatically be able to generate pingbacks.
Hope this helps a few others out of the sandtrap I found myself in.
No Comments Yet
You can be the first to comment!





Leave a comment