Skip to content

Instantly share code, notes, and snippets.

@ammist
Created June 30, 2014 18:58
Show Gist options
  • Save ammist/dbba9bafe7681f79ba90 to your computer and use it in GitHub Desktop.
Save ammist/dbba9bafe7681f79ba90 to your computer and use it in GitHub Desktop.
Image Getting w/ Genesis
// Get the featured image and display it. Note that the link is a lightbox URL.
$img = genesis_get_image( array( 'format' => 'html', 'size' => 'medium', 'attr' => array( 'class' => 'alignleft post-image' ) ) );
$img_large = genesis_get_image( array( 'format' => 'html', 'size' => 'large',
'attr' => array( 'class' => 'lightbox', 'rel' => 'lightbox' ) ) );
?>
<div id="book_cover_image" class="widget widget_image">
<div class="widget-wrap">
<div class="featured_image_widget">
<div class="featured_image">
<?php printf( '<a href="#" title="%s">%s</a>', the_title_attribute('echo=0'), $img ); ?>
</div>
<div class="lightbox"><!-- Bigger Image Here ---></div>
</div>
</div>
</div>
<span class="property-image">
<?php genesis_image( array( 'format' => 'html', 'size' => 'medium') )?>
</span>
Genesis_image will return full HTML (it may not be what you are looking for).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment