IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Add Footer to a Custom Post Type in Genesis 2.0

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

December 21, 2013 Filed Under: How To, WordPress Tagged With: Genesis Framework

Buy me a coffee?

Buy me a coffee If you find any of the articles or demos helpful, please consider supporting my work here, you'll have my big thanks!

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure