Skip to content

Instantly share code, notes, and snippets.

@robincornett
Created August 6, 2013 11:49
Show Gist options
  • Save robincornett/6163833 to your computer and use it in GitHub Desktop.
Save robincornett/6163833 to your computer and use it in GitHub Desktop.
on a site set to show the full content of each post (due to Tribe events calendar), set page_blog.php to return the featured image and content limit.
<?php
add_action ( 'genesis_entry_content' , 'rgc_blog_page' );
function rgc_blog_page () {
if ( !is_page ( array( 'pastors' , 'sermons' ) ) && is_page_template( 'page_blog.php' ) ) {
remove_action ( 'genesis_entry_content' , 'genesis_do_post_content' );
add_action ( 'genesis_entry_content' , 'rgc_blog_content' );
}}
function rgc_blog_content () {
echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">'; // Original Grid
echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail', array('class' => 'alignleft') );
echo '</a>';
the_content_limit ( 300, '[ Read More ]' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment