Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active April 14, 2017 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/9966289784feefe0396620b04f5e6c0c to your computer and use it in GitHub Desktop.
Save braddalton/9966289784feefe0396620b04f5e6c0c to your computer and use it in GitHub Desktop.
Custom Post Type Archive Page Template https://wp.me/p1lTu0-gP2
<?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