simbasounds
9/20/2014 - 7:33 PM

A portfolio custom post type archive with title, excerpt and thumbnail hooking into Genesis Framework

A portfolio custom post type archive with title, excerpt and thumbnail hooking into Genesis Framework

<?php
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
 
add_action( 'genesis_after_entry_content', 'add_entry_header' );
function add_entry_header() {
	genesis_entry_header_markup_open();
	echo "<div class='portfolio-block-info'>";
		genesis_do_post_title();
		the_excerpt();
	echo "</div>";
	genesis_entry_header_markup_close();
}

add_action('genesis_entry_content', 'post_thumbnail');
function post_thumbnail() {
	if ( has_post_thumbnail() ) { ?>
		<a href="<?php echo get_page_link(); ?>" title="<?php echo get_the_title(); ?>">
			<?php the_post_thumbnail( $size, $attr ); ?>
		</a>
	<?php }
}

genesis();