Skip to content

Instantly share code, notes, and snippets.

@BoweFrankema
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoweFrankema/fb4bdfa512ed87ce0244 to your computer and use it in GitHub Desktop.
Save BoweFrankema/fb4bdfa512ed87ce0244 to your computer and use it in GitHub Desktop.
Simply user media loop
<?php if ( have_rtmedia () ) { ?>
<div class="widget">
<h4>Recent Photos</h4>
<div class="rtmedia-container">
<ul class="rtmedia-list rtmedia-list-media <?php echo rtmedia_media_gallery_class (); ?>">
<?php while ( have_rtmedia () ) : rtmedia (); ?>
<li class="rtmedia-list-item" id="<?php echo rtmedia_id(); ?>">
<a href ="<?php rtmedia_permalink(); ?>" title="<?php echo rtmedia_title(); ?>" class="<?php echo apply_filters( 'rtmedia_gallery_list_item_a_class', 'rtmedia-list-item-a' ); ?>">
<div class="rtmedia-item-thumbnail">
<img src="<?php rtmedia_image("rt_media_thumbnail"); ?>" alt="<?php rtmedia_image_alt(); ?>" >
</div>
</a>
</li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment