• Astroyka

    (@astroyka)


    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:

    https://vxv.so/clip4170515_162Kb.jpg

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

    HTH

    https://www.ads-software.com/extend/plugins/wp-rss-multi-importer/

Viewing 1 replies (of 1 total)
  • John Grover

    (@johngrover)

    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

Viewing 1 replies (of 1 total)
  • The topic ‘Tip: Add feed title to colorbox overlay’ is closed to new replies.