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’ );
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.
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.
thanks Arup this is a very good help………
How to remove tags only andd keep the category?
Thank’s.
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;
}
How to remove category only and keep tags?
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;
}
Very precise and useful. How about if we remove the author and comment and keep the date on home page?
You have to add new rule for that in function.php file.
Thanks for your valuable answer Arup
Happy new year 🙂
It’s better to use genesis simple edit plugin. Totally hassle-free solution.
Happy new year.
How to Remove both Tags and Categories
Add filter for both or use Genesis simple edit.
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;
}
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.
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.
Hi,
Thanks for your reply. I followed your instructions. My site is up again and everything’s working fine.
how to remove Genesis 2.0 child themes
Go to Appearance>> Themes and locate the child theme you want to delete.
Oh! Awesome
I Just Search This Things For Couple of Time and got it. Its Work
How do I stop it from showing on homepage?
Once you add the code in function.php file , the tags/categories will be hidden from single posts as well as from archives and home page.
How to remove only home page?
So in the place of if(!is_page()) use !is_home() && !is_front_page() && !is_archive() , to remove the tag/category from homepage as well as from archive pages.
Good evening
Is it possible to have all the entry-meta in Entry_footer
As in this theme?
https://demo.themegrill.com/spacious/blog/
Thank you
Sorry I’m starting with the Genesis framework
Sure you can do that, use the Genesis simple edits plugin and add author, date, category and comment shortcode to the footer.
ohhhh god finally i found the solution thanks bro …thanks lot