I often like to style my category and/or tag list differently then just a comma separated list (see the bottom of this post for an example). I’ve always done a bit of hacking using the_tags or the_category, which is okay… but not the fast, simple, and Genesis (affiliate link) way.
The Genesis Way
Enter Genesis Shortcodes.
There is simple code already available on customizing the meta. Below is a gist from Brian Gardner:
Notice the “post_categories” & “post_tags” shortcodes in there? Genesis does all of the dirty work for us here. Now, go back to the shortcode reference I linked to earlier. Those shortcodes have all sorts of attributes available in them.
Remove The Comma
Removing the comma is as simple as using the “sep” attribute. Sep is short for “separator”, naturally.
Here is the code, which removes the separator from the categories and the tags.
I know, I know… seems too easy right? Glad I could help 😉
Robert Barnes says
Hi Mike – Thanks for this. Stupid question, but where do I put that code? I use the Dynamik Theme (http://cobaltapps.com/downloads/dynamik-website-builder/) and presumed it would be in their custom functions, but that didn’t work. I understand you probably don’t know this theme, so where would I put the code if I was just using plain Genesis?
I also use the Simple Hooks plugin if that makes it easier.
Many thanks in advance.
Mike Hemberger says
@Rob – You should put this code in whatever template you are trying to modify… If i wanted to remove the comma for all single posts, I would put it in single.php. To remove it from post archives put it in archive.php.
If you want to remove the comma globally throughout the whole site, put it in your functions.php file.
Let me know how it goes!
Robert Barnes says
Thanks Mike – I’m still waiting for response from my theme’s support team…