When you create a single or an archive page for a custom post type in Genesis 2.0 (HTML5), the formatting is not consistent with typical post. What’s apparent is the absence of <footer class="entry-footer">
tag in the custom post type page.
The difference between the two are highlighted on the codes below:
Custom Post Type
<p class="entry-meta"> <span class="entry-categories"> Filed Under: <a rel="category tag" title="View all posts in Uncategorized" href="https://www.itnota.com/category/uncategorized">Uncategorized</a> </span> <span class="entry-tags"> Tagged With: <a rel="tag" href="https://www.itnota.com/tag/genesis-framework/">Genesis Framework</a>, <a rel="tag" href="https://www.itnota.com/tag/html5/">HTML5</a> </span> </p>
Typical Post
<footer class="entry-footer"> <p class="entry-meta"> <span class="entry-categories"> Filed Under: <a rel="category tag" title="View all posts in Uncategorized" href="https://www.itnota.com/category/uncategorized">Uncategorized</a> </span> <span class="entry-tags"> Tagged With: <a rel="tag" href="https://www.itnota.com/tag/genesis-framework/">Genesis Framework</a>, <a rel="tag" href="https://www.itnota.com/tag/html5/">HTML5</a> </span> </p> </footer>
The easiest way to do this is by utilizing using Genesis Shortcodes and replace the genesis_entry_footer
with our own footer markup.
remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); add_action( 'genesis_entry_footer', 'my_entry_footer_markup_open', 5); function my_entry_footer_markup_open() { echo '<footer class="entry-footer">'; } add_filter( 'genesis_post_meta', 'my_post_meta' ); function my_post_meta( $post_meta ) { $post_meta = '[[post_categories]][[post_tags]]'; return $post_meta; } remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); add_action('genesis_entry_footer', 'my_entry_footer_markup_close', 15); function my_entry_footer_markup_close() { echo '</footer>'; }
Further Reading
Genesis Framework Shortcode Reference
Function Reference/wp get post tags
Function Reference/wp get post categories