How can I make the text in the_tags function translatable? Currently I'm using following:

<?php the_tags('<div class="tags">Post Tags',' ','</div>'); ?>  

But I'd like to make 'Post Tags' text translatable by adding the text domain, similar to this:

_e('Post Tags', 'textdomain');

1 Answer 1


Translate the title before you send it to the_tags():

    '<div class="tags">' . __( 'Post Tags', 'textdomain' ),
    ' ',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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