This is one of those little things that had been bugging me for a while, but it took me a lot of searching to find a solution that worked. Eventually, I did find a solution that worked for me, so I’m sharing it here in case anyone else is having the same trouble. It’s a very niche issue, but hopefully, it’ll save someone some time.
What I wanted to do sounds like it should be simple: change the “Filed Under:” and “Tagged With:” labels for the metadata on WordPress posts. This is the metadata that usually displays at the top of posts.
I’m using the Genesis Framework. With Genesis, things like this are usually handled with code snippets to go in the functions.php. It’s a simple and elegant way to do it so long as you get the right code in the snippet. Thankfully, a lot of Genesis experts have shared a huge number of snippets to do all sorts of things.
And there are quite a few snippets that are designed to do exactly what I wanted to do here–replace the “Filed under” and “Tagged With” labels. But I tried a bunch of them over time and couldn’t get any of them to work for one reason or another. Some of them had no effect. Some of them crashed my site with a white screen (thanks for incompatible code in the functions.php file). I couldn’t figure out precisely why each didn’t work. Some seemed to be written for older versions of the Genesis Framework. Others may have been clashing with plugins or other snippets. But the upshot is that I just couldn’t find a solution. And based on the comments that had accumulated over time, it’s clear I wasn’t alone.
Even using the Simple Edits plugin for Genesis, the solution wasn’t immediately self-evident. But it turns out that the solution is very simple once you know the little trick. But for some reason, I had a lot of trouble finding that little trick. Part of the problem is that it turns out the best reference is behind Studiopress’s paywall and doesn’t show up in Google searches. And even on that page, it still doesn’t leap out at you.
How To How to Remove or Replace “Filed Under” and “Tagged With” from Post Metadata in Genesis Framework
The first part is to use the Simple Edits plugin. It’s free and simple. You can find it on the WordPress plugin repository. I have no doubt there’s a way to get the same effect with a function.php snippet and without using the Simple Edits plugin, but I couldn’t find a snippet that worked for me and I was spending too much time tryign to find one. This approach did work, and worked quickly and simply.
It comes down to this . . . The default shortcodes for display the categories and tags in metadata are
So if you’re using the Simple Edits plugin and want those fields displaying on new lines, you might have something like this in the “Entry Meta (above content)” field:
[post_categories] <br/> [post_tags]
But that retains the original “Filed Under:” and “Tagged With:”.
It turns out that there are also a few attributes you can use with those particular shortcodes. You can change the separator between items in the list from the default comma to something else (eg.
[post_categories sep="// "]. You can append text or markup after the list (eg.
[post_categories after=" archives."]
And there’s also one that overrides what comes before the list of categories or tags, which is usually the label for that list. So you can use:
[post_categories before=""] <br/> [post_tags before=""]
That results in something like this:
You can specify what text you want instead between the quotes, and it will replace the default “Filed Under:” and “Tagged With:”. If you put nothing between the quotes, it’ll be blank, like the example above. If you want “Categories” and “Tags” instead, you’d have something like this:
[post_categories before="Categories: "] <br/> [post_tags before="Tags: "]
That generates this:
With a very simple hack, you can even use something like Font Awesome to put in icons instead. You add the Font Awesome icon and then remove the label by removing everything between the quotes. If you already have Font Awesome set up, you can use something like this, for example:
<i class="fa fa-archive"></i>[post_categories before=""] <br/><i class="fa fa-hashtag"></i> [post_tags before=""]
So, there it is. Hardly revolutionary, and not at all hard once you know how. But it was one of those niggling things I’d been looking to solve for a while and simply couldn’t find.
Hopefully, this helps someone else out.