WordPress.org

Forums

Link list (aka. blogroll) RSS Feed (7 posts)

  1. mrsugar
    Member
    Posted 8 years ago #

    Hi there,

    This has to be super simple, but I can not find anywhere how to do it. Here's the deal:

    I constantly add links to my blog via the WordPress 'add link' manager in wp-admin. I have a single category that has every link. As I add links the most recent ones show up on my site (www.fluidvision.net). I want an RSS feed for these links. In other words, I want a RSS feed to be updated with the new link every time I add one. This way my readers can have RSS of my posts and my links.

    I don't care about external RSS linking or anything, I just want my latest links in an RSS file.

    Thanks so much for your help. Cheers,

    Bruce

  2. mrsugar
    Member
    Posted 8 years ago #

    I am still looking for help with this. Is anyone able to give some advice?
    Thanks.

  3. camu
    Member
    Posted 8 years ago #

    Hi there, I was looking for the same thing but was unable to find it around, so I made a page using a "custom page template" by myself. Please contact me at "info at duechiacchiere.it" so that I can send you the code. It's a very ugly solution, but it works.

  4. You cannot get an RSS feed of the links easily, however you can get an OPML list of the links by going to http://yourblog.com/wp-links-opml.php .

    A lot of sites that support big lists of links support the OPML format, as do many feedreaders.

  5. camu
    Member
    Posted 8 years ago #

    Otto42, that's not true. I did it:

    http://www.duechiacchiere.it/letture/

    This page shows links from a given category, and this

    http://www.duechiacchiere.it/blogrollfeed/

    is a RSS feed I build using those links. The trick is to build a custom page template:

    http://codex.wordpress.org/Pages#Page_Templates

    and add some code like this


    <?php
    header('Content-type: text/xml; charset=ISO-8859-1');
    echo '<?xml version="1.0" encoding="ISO-8859-1" ?>'; ?>
    <!-- Generated by WordPress <?php echo $wp_version ?> -->
    <rss version="0.92">
    <channel>
    <title>le letture di camu</title>
    <link>http://www.duechiacchiere.it/blogrollfeed</link>
    <description>Put a description for this feed.</description>
    <lastBuildDate><?php echo date('D, d M Y H:i:s +0000'); ?></lastBuildDate>
    <docs>http://backend.userland.com/rss092</docs>
    <?php
    global $wpdb;
    // I want to show links from category ID = 10
    $myLinksSQL = "SELECT link_url, link_name, link_description FROM wp_links WHERE link_category = 10 ORDER BY link_id DESC LIMIT 0,15";
    $myLinksArray = $wpdb->get_results( $myLinksSQL );
    if ( !empty($myLinksArray) ) {
    foreach ($myLinksArray as $aLink) : ?>
    <item>
    <title><?php echo html_entity_decode( $aLink->link_description, 0, 'ISO-8859-1' ) ?></title>
    <description>written by <?php echo html_entity_decode( $aLink->link_name, ENT_QUOTES, 'ISO-8859-1' ) ?></description>
    <link><?php echo $aLink->link_url ?></link>
    </item>
    <?php
    endforeach;
    } ?>
    </channel>
    </rss>

    Then I add new links using
    URL: link URL
    Name: author
    Description: Post title

  6. Coolmann: I didn't say it was not possible. I said it was not "easy".

  7. mrsugar
    Member
    Posted 8 years ago #

    Thank you sooooo much! Your solution works great, although it is a bit of a workaround.

  8. mrsugar
    Member
    Posted 8 years ago #

    Opps.. double post.

Topic Closed

This topic has been closed to new replies.

About this Topic