WordPress.org

Ready to get started?Download WordPress

Forums

WP RSS Multi Importer
Tip: Add feed title to colorbox overlay (2 posts)

  1. Astroyka
    Member
    Posted 1 year ago #

    Hi,

    If, like me, you want the title of the feed to be displayed in the colorbox overlay you can pass the "title" to colobox using:

    title="'.$items["mytitle"].'"

    In the href for the feed item anchor.

    Using the DEFAULT template as an example, around line 75, simply add this to the first anchor tag.

    EG:

    $readable .= '<div class="rss-output" style="float:'.$divfloat.'"><div class="title"><span style="font-size:'.$hdsize.'; font-weight:'.$hdweight.';"><a '.$openWindow.' href="'.$items["mylink"].'" '.($noFollow==1 ? 'rel=nofollow':'').' title="'.$items["mytitle"].'" >'.$items["mytitle"].'</a></span>';

    You can also get creative and include the feed name with a bit of formatting too:

    $_title = $items["myGroup"].': '.$items["mytitle"];
    
    $readable .=  '<div class="rss-output" style="float:'.$divfloat.'"><div class="title"><span style="font-size:'.$hdsize.'; font-weight:'.$hdweight.';"><a '.$openWindow.' href="'.$items["mylink"].'" '.($noFollow==1 ? 'rel=nofollow':'').' title="'.$_title.'" >'.$items["mytitle"].'</a></span>';

    By default this will be displayed at the footer of the overlay, centre aligned, but with a bit of CSS hackery you can move this to the top along with the "close" icon. This is mine:

    http://vxv.so/clip4170515_162Kb.jpg

    I added a CSS gradient and left aligned it to fit in with the rest of my site.

    HTH

    http://wordpress.org/extend/plugins/wp-rss-multi-importer/

  2. John Grover
    Member
    Posted 1 year ago #

    Hi Astroyka,

    Very well done! Love the look and feel of the ESA website, and the fact that each page has its own separate color header. Saturn always turns my head :)

    Kind regards,
    John

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.