开发者

the_time('M') does not work in Wordpress

I need to get months like Jan, Feb in Wordpress. I hav开发者_如何学Ce tried:

the_time('M')
the_time('b')
the_date('M')
get_the_date('M')

But I get no output at all. All other formats except M work, and since it is printing the value right away I can not format it afterwards.

Any ideas?


the_time('M') and the_date('M') do same thing and working Other 2 maybe didn't work because i never used it try :

<?php the_time('F j, Y'); ?> & <?php the_time('g:i a'); ?>


Where are you trying to run this? Remember that the_time() has to be used within the Loop, otherwise it won't have anything to print/return: http://codex.wordpress.org/Function_Reference/the_time

Hope that helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜