WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know if there is a way to change the callback function for a tag-like custom taxonomy so that it breaks terms after a semicolon instead of a comma? I realize I can rewrite the whole meta box, but I'd rather not if there's an easier way.

share|improve this question
up vote 3 down vote accepted

The tag delimiter is made translatable:

$comma = _x( ',', 'tag delimiter' );

So this can be changed with a simple filter:

add_filter( 'gettext_with_context', 't5_semicolon_tag_delimiter', 10, 4 );

function t5_semicolon_tag_delimiter( $translated, $text, $context, $domain )
    if ( 'default' !== $domain or 'tag delimiter' !== $context or ',' !== $text )
        return $translated;

    return ';';

Install as plugin; works without any side effects.

What is tricky: changing the string Separate tags with commas to say semicolon. You cannot use the same solution, because you don’t know the language of your users. Not sure how to handle that.

share|improve this answer
This still will not work, because of these two lines in the wp_set_post_terms function: $tags = str_replace( $comma, ',', $tags ); $tags = explode( ',', trim( $tags, " \n\t\r\0\x0B," ) );. No matter what you do, at some point the underlying WordPress code will force your tags to be delimited by commas. – Jordan Reiter Jul 15 '15 at 16:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.