Change the Genesis Meta Output, Post-Info, Post-Meta and Post-Terms

This tutorial takes you through changing the Genesis Meta Output, the Post-Info, Post-Meta and Post-Terms, post-info is typically at the top of a single post above or below the heading with dates, author and comments info, post-meta is at the foot of the post and includes category and tag info and post-terms applies to custom taxonomy output also rendered at the foot of a post that utilises custom taxonomy.


You may wish to control the post header or footer meta order or add or omit certain words – in the above screen grab in the header meta the word ‘by‘ is now looking odd (after an icon meta makeover), this can be removed by the genesis_post_info filter by adding in your functions.php

So now just the meta shortcodes are just returned, which can also be reordered – you could also not use CSS pseudo selectors and instead add in the HTML mark up for the icons directly in the filter before each shortcode like so….

// Customize entry meta
 add_filter( 'genesis_post_info', 'themeprefix_post_info_filter' );
 function themeprefix_post_info_filter( $post_info ) {
 $post_info = '<span class="dashicons dashicons-clock"></span>[[post_date]] [[post_author_posts_link]] [[post_comments]] [[post_edit]]'; return $post_info; } 

For the meta in the footer the genesis_post_meta filter is used…

Same thing applies here you swap them around or take one out – you can also apply to both filters genesis_post_info and genesis_post_meta a label which alters the text that precedes or succeeds the meta in the form of before=”text goes here” or after=”text goes here” within the shortcode like so…

// Customize entry meta footer
 add_filter( 'genesis_post_meta', 'themeprefix_post_meta_filter' );
 function themeprefix_post_meta_filter( $post_meta ) {
 $post_meta = '[[post_categories before="Filed DownUnder: "]] [[post_tags after=" oh my"]]';
 return $post_meta;

Output Custom Taxonomy Terms in Genesis

Back to custom taxonomy, this time how do you output these?

Well you can use the genesis_post_meta filter again, using the post-terms shortcode with taxonomy=”your-custom-term” which outputs a specific set of custom terms that have been registered to use in WordPress.

So an example of this would be like so with a custom taxonomy registered named country_category

If you wanted multiple custom tax terms then just another post-terms shortcode and change the details.