Remove Post Meta from Category Archive Pages in a Genesis Theme in WordPress

Archive pages in a Genesis theme by default, include the post info which displays  the post author, post date and comments info and the post meta which displays the category and tag values.



You may want to have these values removed or edited for your Archive pages but leave them intact for regular posts. This is possible by adding an action and function in your themes functions.php file:

// Remove Post Info, Post Meta from Archive Pages
function themeprefix_remove_post_meta() {
	if (is_archive()) {
		remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
		remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
add_action ( 'genesis_entry_header', 'themeprefix_remove_post_meta' );

The code looks to see if the page is an Archive page which would include all Archive Pages including categories and tag pages. Then these post info and post meta data is removed just from that type of page.



The remove action for the genesis_post_info has a priority number set (12), this is because the original action is added with this number in the post.php file in the structure directory of the main Genesis framework. To remove the original action they have to be exactly the same.

The code snippet uses a conditional statement if, you can target a number of pages by adding in the right conditions.