luke-williams.co.uk

wordpress howto: RSS get_links

I contribute to the Wordpress CMS community, by helping new users in the forums and sharing additional functionality I’ve developed in PHP.

My most recent contribution was an approved “HowTo:” article to amend the get_links function to include an RSS icon in front of each entry that had an RSS feed, and to make that icon link to the feed for that link.

(get_links outputs a list of links as created by the user in the CMS back-end)

rss icon

A section of the HowTo code:

Delete Line 94 of bookmark-template.php -

$output .= $before;

and replace it with this -
$feed = clean_url($row->link_rss);

if ( !$feed )
{
$output .= $before;
}
else
{
$output .= $before . ‘<a href=”‘ . $feed
. ‘”><img src=”‘ . get_bloginfo(’url’)
. ‘/wp-includes/images/rss.png”
alt=”rss”></a> ‘;
}