Add rel=lightbox to images automatically extracted from foreign rss feed

Hello. I am trying to add an image feed from Tublr onto my wordpress site. I created a custom page template and added this code to get the feed:

[php]<?php
include_once(ABSPATH . WPINC . ‘/rss.php’);
$feed = ‘http://example.com/feed/’;
$rss = fetch_feed($feed);
if (!is_wp_error( $rss ) ) :
$maxitems = $rss->get_item_quantity(3);
$rss_items = $rss->get_items(0, $maxitems);
if ($rss_items):
echo “

    \n”;
    foreach ( $rss_items as $item ) :
    echo ‘
  • ’;
    echo ‘’ . $item->get_title() . “\n”;
    echo ‘

    ’ . $item->get_description() . “

  • \n”;
    endforeach;
    echo “
\n”;
endif;
endif;
?>[/php]

I get the feed I want but I would want to add an extra funcionality - namely I wanted to add rel=“lightbox” to all the images that are extracted so people can click on them to view them enlarged - some are a little small by default.

Anyone can show me how to tweak this php code in order to achieve this?

Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service