Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save braddalton/6093801 to your computer and use it in GitHub Desktop.
Save braddalton/6093801 to your computer and use it in GitHub Desktop.
/** Add the featured image after post title */
add_action( 'genesis_before_post_title', 'executive_portfolio_grid' );
function executive_portfolio_grid() {
if ( has_post_thumbnail() ){
echo '<div class="portfolio-featured-image">';
echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
echo get_the_post_thumbnail($thumbnail->ID, 'portfolio' );
echo strip_tags(the_excerpt($post- id));
echo '</a>';
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment