Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.