Last active
April 14, 2017 11:01
-
-
Save braddalton/9966289784feefe0396620b04f5e6c0c to your computer and use it in GitHub Desktop.
Custom Post Type Archive Page Template https://wp.me/p1lTu0-gP2
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 | |
//* Relocate archive intro text | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_taxonomy_title_description' ); | |
//* Remove the entry meta in the entry header | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); | |
//* Remove the entry image | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
//* Add the featured image after post title | |
add_action( 'genesis_entry_content', 'add_featured_image' ); | |
function add_featured_image() { | |
if ( $image = genesis_get_image( 'format=url&size=full' ) ) { | |
printf( '<div class="entry-image"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) ); | |
} | |
} | |
//* Remove the entry meta in the entry footer | |
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment