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

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

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

Comments

  1. Jonathon Fowler says

    June 12, 2021 at 7:46 am

    Hi, thanks for this. If I add this code to my functions.php, the meta is removed from the archive pages, which is what I want, but it also removes the meta from the blog pages…i thought this code keeps the metadata within the blog page, but removes it from the archive?

    Log in to Reply
    • Jonathon Fowler says

      June 12, 2021 at 7:48 am

      Ignore my comment, I cleared my cache and all works great. Thank you very much Brad!

      Log in to Reply
      • Brad Dalton says

        June 12, 2021 at 10:15 am

        Awesome!

        Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.