Created
August 6, 2013 11:49
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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