I want to display a in Hindi like "jan 10" using get_the_date(). What i have tried :

<?php echo get_the_date(_e('F j')); ?>

output like : F jJanuary 10, 2017.

Try below code.

echo get_the_date(__('M d'));

Output:

Feb 09

echo get_the_date(__('M d, Y'));

Output:

Feb 09, 2017

  • It doesn't work in hindi. It output like in hindi : ???? 23 – shubham shah Feb 16 '17 at 11:19
  • It shows in hindi if you are selected site language hindi (Dashboard >> Settings >> General) – AddWeb Solution Pvt Ltd Feb 16 '17 at 12:50
  • But I want both english and hindi on my site when user click on language translate button.. check url : competitionmantra.com – shubham shah Feb 17 '17 at 5:40

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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