Yesterday, I was customizing layout for my other blog – Aussian. Since I have Genesis sample theme installed on that blog, by default it shows post meta information, such as category and tag information under each post excerpt on the home page. It was not looking very professional and taking up unnecessary space, so I decided to remove it.
I did some Googling and all tutorials, including Studiopress official snippets page gave below alternative, if you want to do it without plugin. So basically you have to add below line in functions.php of your child theme:
//* Remove the post meta function
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
However, it didn’t work for me. I tried googling some more, but couldn’t find what I was missing.
No matter how many times I tried to save the code, flush the cache, refresh my blog, post meta information just kept defiantly staring at me.
Here comes the the Solution
After going through Genesis simple hooks plugin interface, I found a solution. There was no action hook named genesis_after_post_content. No wonder the code didn’t work. It can’t remove what’s already not there.
Instead, there is a hook called – genesis_entry_footer, from which you need to remove post meta information. Apparently, this change happened in Genesis 2.0 when it made changes to adopt new HTML5 standards. Below code should work if you have upgraded to Genesis 2.x:
//* Remove category and tag information from the post – @letsgeek.net
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
So, if you are struggling to remove post meta information just like me, try this solution.
If you like the solution, please spread the love and share it in the community.