Test Post with a Tag with Commas
As the title says, this is a WordPress post with a comma separated tag. Sometimes this comes in handy, for example when you want to display a taxonomy called “restaurant, bar” or a city and it’s country: “Groningen, the Netherlands”. This is all done using a simple WordPress filter, are you interested in the code?
WordPress taxonomy contains comma, i.e allow commas in tag names.
/** * WordPress filter for tags with commas * replace '--' with ', ' in the output - allows commas in tag names this way * e.g. save tag as "Fox--Peter" but display like "Fox, Peter" * or "cafe--restaurant" for a tag "cafe, restaurant" * * Follow me on Twitter: @HertogJanR, https://www.saotn.org * Donate: https://www.paypal.me/jreilink **/
You can find the function code and explanation in my Display commas in WordPress tags blog post on Sysadmins of the North: