Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Last active December 11, 2015 15:08
Show Gist options
  • Save jamiemitchell/4618654 to your computer and use it in GitHub Desktop.
Save jamiemitchell/4618654 to your computer and use it in GitHub Desktop.
Custom category page for Genesis Framework
<?php
/* Add the featured image after post title
------------------------------------------------------------ */
add_action( 'genesis_before_post_title', 'jm_portfolio_grid' );
function jm_portfolio_grid() {
if ( has_post_thumbnail() ){
echo '<a class="alignleft" href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail', array('class' => 'alignleft'));
echo '</a>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment