Genesis is my favorite WordPress Theme Framework. On Crunchify, we have published more than 100 tricks and tips on customizing Genesis Child theme.
In this tutorial we will go over how to customize and remove Comma between Categories and Tags for your Genesis WordPress theme.
Take a look at below Categories and Tags
on Crunchify site.
First thing first. Here is a code to modify Genesis Post Meta values.
add_filter(‘genesis_post_meta', ‘crunchify_post_meta');
function crunchify_post_meta($post_meta)
{
if (!is_page() && !is_home() && !is_front_page() && !is_archive() && !is_search()) {
$post_meta = ‘[post_categories before=”” sep=””] [post_tags before=”” sep=””]';
return $post_meta;
}
}
|
Just add sep=""
into post_categories
and post_tags
Genesis hook and it will bypass omitting Comma (,)
after reach tags and categories.
Also, if you want to achieve same effect as Crunchify, you may need to remove Filed Under text also and hence we are using before=""
arguments too.
CSS code to beautify Tags and Categories
/* ## Entry Meta
——————————————— */
p.entry–meta {
font–size: 13px !important;
font–size: 1.3rem !important;
margin–bottom: 0;
}
.entry–header .entry–meta {
margin–bottom: 24px;
margin–left: 45px;
color: #b11f24;
}
.entry–footer .entry–meta {
border–top: 2px solid #f5f5f5;
padding–top: 24px;
}
.entry–footer {
font–size: 15px;
}
.entry–categories,
.entry–tags {
display: block;
float: right;
padding–bottom: 20px;
}
.entry–footer .entry–categories,.entry–footer .entry–tags{
float:left;
}
.entry–categories a,.entry–tags a{
color: #222;
background: #eee;
border–radius: 20px;
padding: 4px 10px;
}
.entry–categories a:hover,.entry–tags a:hover{
color: #b11f24;
}
.entry–categories a:before,.entry–tags a:before {
font–family: fontawesome;
content: ‘\f02c';
color: #b11f24;
margin–right: 5px;
vertical–align: top;
}
.entry–tags a:before {
font–family: fontawesome;
content: ‘\f02c';
color: #4285f4;
margin–right: 5px;
vertical–align: top;
}
|
I know, it’s very simple but I’m sure this will help you beautify your site. Happy blogging.