WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

I'm using previous_post_link('%link','Previous Post'); and next_post_link('%link','Next Post'); for post navigation but I want to add text domain to that similar to _e('Next Post' , 'ft');

How can I do that?

share|improve this question
Whaaa? Please elaborate, good sir... – TheDeadMedic Jun 23 '13 at 6:15
[pre]I'm using : <?php previous_post_link('%link','&larr; Previous Post'); ?> and <?php next_post_link('%link','Next Post &rarr;'); ?>[/pre] – user2436681 Jun 23 '13 at 6:16
previous_post_link( '%link', __( '&larr; Previous Post', 'my_domain' ) );

Check out an explanation of the translator functions.

share|improve this answer
Thanks it's worked :) – user2436681 Jun 23 '13 at 6:27

Use it like:

<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> Older posts', 'your-theme-textdomain' )) ?></div>
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&raquo;</span>', 'your-theme-textdomain' )) ?></div>

Thanks to Ian Stewart for the bit of codes.

share|improve this answer
Thanks it's worked :) – user2436681 Jun 23 '13 at 6:27

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.