1

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');
2

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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