Using Light box with SimplePie
Im working on a project that uses SimplePie to to pull in a number of news feeds which is working great, but I would like the SP links to open the page on site in a LightBox, how can I do this?
The code that Im using to generate the SP links is as follows:
<?php if ($feed->error): ?>
<p><?php echo $feed->error; ?></p>
<?php endif; ?>
<?php foreach ($feed->get_items() as $item): ?>
<div class="chunk">
<div class="time-stamp">
<?php echo $item->get_date('j M Y | g:i a T'); ?></p>
</div>
<h4 <style="background:url(<?php $feed = $item->get_feed(); ?>) no-repeat; margin: 0 0 10px;"><a href="<?php echo开发者_JAVA技巧 $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></h4>
Any help that you can give me would be great, thanks.
Hey hi, You can use this JQuery plugin http://colorpowered.com/colorbox/ Its a very good one.
For your code, you will have to use something very simple like
<a class="cboxElement" href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a>
Thanks, Akshat
精彩评论