• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Display Entry Meta on Single Posts Only

This code removes the entry meta in the entry header which is also referred to as the post info, from all archives so it only displays on single posts in Genesis.

The code also removes the entry meta in the entry footer so it only displays on single posts also.

Here’s the before & after shots. The 1st image shows the entry meta on single posts only and the 2nd image shows the entry meta removed from all archives including the front & blog pages.

Single Post

entry-meta

Single Post Entry On Archives

removed-entry-meta

The method used to only display the entry meta on single posts is a bit tricky to workout.

add_action( 'loop_start', 'remove_entry_meta' );
function remove_entry_meta() {

if ( is_singular('post') )
return;

remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );

remove_action( 'genesis_entry_footer', 'genesis_post_meta' );  
}

Entry Meta

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems