Use a div for post info in Genesis

The “Genesis Post Info” displays the post date, author, and comment count above the post content. You can modify this content using the genesis_post_info filter.

The output is all wrapped in a paragraph –  <p class="entry-meta"> – inside the post’s <header>. You can modify this markup using the Genesis Markup API.

The code below changes the paragraph into a div: <div class="entry-meta">

/** * Use a div for post-info, open * * @author Bill Erickson * @link * */ function be_post_info_markup_open( $open, $args ) { return sprintf( '<div %s>', genesis_attr( $args['context'], array(), $args ) ); } add_filter( 'genesis_markup_entry-meta-before-content_open', 'be_post_info_markup_open', 10, 2 ); /** * Use a div for post-info, close * * @author Bill Erickson * @link * */ function be_post_info_markup_close( $close, $args ) { return '</div>'; } add_filter( 'genesis_markup_entry-meta-before-content_close', 'be_post_info_markup_close', 10, 2 );

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk