How to Remove Post Category and Tags in Genesis 2.0 Child Themes

By default Genesis child themes shows post-meta info after the header and footer of a single post. On the header part it shows article publishing  date, authors name and comment link and on the footer part there is file under category and tag links. As most of us use category or tag links as menu items it is not necessary to show them after an article.

The post category and tags can  easily removed from blog posts and pages easily in Genesis 2.0 child themes easily by adding a simple function in function.php file of the child theme. The new code on function.php file will overwrite default Genesis framework output.

For old Genesis child themes the code was as following:

/** Remove the post meta function by wptron **/
remove_action(‘genesis_after_post_content’, ‘genesis_post_meta’);

But as all Genesis 2.0 child themes have HTML5 markup enabled the default hooks changed. Now you have to use the following piece of code to get the same output.

/** Remove the post meta function by wptron **/
remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );

genesis-post-meta
Before

This code will also remove post category and tags from post excerpts. We can also remove anyone from post category and tags. For that purpose we will need a filter instead. To show the categories only use the following code.

After
After

If you want to show tags instead replace “post_categories” with “post_tags” and add the code in the bottom of function.php file. But before you make any changes on the function.php file please download a copy in your PC.

Meta data on post header can also be edited the same way with following code.

If you want to do the thing in a code free way, there is a free plugin called  Genesis Simple Edits . With Simple Edits you can also edit footer credit links as well as post meta data.

25 thoughts on “How to Remove Post Category and Tags in Genesis 2.0 Child Themes”

    • Try the following code:

      /** Customize the post footer function by wptron */
      add_filter(‘genesis_post_meta’, ‘wpt_info_filter’);
      function wpt_info_filter($entry_footer) {
      if (!is_page()) {
      $entry_footer = ‘[post_categories]’;
      }
      return $entry_footer;
      }

      Reply
      • You just need to filter out the tags in post footer.
        Try the following code:

        /** Customize the post footer function by wptron */
        add_filter(‘genesis_post_meta’, ‘wpt_info_filter’);
        function wpt_info_filter($entry_footer) {
        if (!is_page()) {
        $entry_footer = ‘[post_tags]‘;
        }
        return $entry_footer;
        }

      • Add Both like Below. But show Error.

        If add one filter then ok. So Please Tell me what should i do

        /** Customize the post footer function by wptron */
        add_filter(‘genesis_post_meta’, ‘wpt_info_filter’);
        function wpt_info_filter($entry_footer) {
        if (!is_page()) {
        $entry_footer = ‘[post_categories]‘;
        }
        return $entry_footer;
        }

        /** Customize the post footer function by wptron */
        add_filter(‘genesis_post_meta’, ‘wpt_info_filter’);
        function wpt_info_filter($entry_footer) {
        if (!is_page()) {
        $entry_footer = ‘[post_tags]‘;
        }
        return $entry_footer;
        }

  1. Hi Arup,

    I added the “post footer function” code in my function.php and it worked, the tags are finally removed. However, when I added the “post header function” code in the same file, my site showed this error:

    “Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.”

    I cannot access wordpress anymore. Have anyone encountered this? Kindly advise. Thank you.

    Reply
    • Maybe there is some kind of encoding issue while pasting the code. Hope you have got a backup of function.php file. Just replace the function file in theme folder with the old one, everything will become normal again.

      Reply
      • Hi,

        Thanks for your reply. I followed your instructions. My site is up again and everything’s working fine.

Leave a Comment