I have a loop, like this:
<?php query_posts('cat=4');?> <?php while (have_posts()) : the_post();?> <?php the_title();?> <?php the_time(' Y-m-d, H:i'); ?> <?php endwhile;?> <?php wp_reset_query();?>
Im using it to make a list of recent news. The title of the news (from the_title) is showing up in the browser. But the problem is that the date, from the_time, isn't showing up as date, it's showing up as Y-m-d H:i IN THE BROWSER?!
I have tried to place my the_time -function in other loops in my theme and in other template files, I have even tried to look at the theme in other browsers like chrome, IE9 and firefox. I get the same problem every time. I also tried to use the php function date, to show the actual date like this:
<?php echo date(' Y-m-d, H:i'); ?>
That works properly, showing the recent time/date.
I have also tried to use the_time function and the_date function in wordpress without giving it any formatting characters. At that time, the function is working.
What is wrong? Why can't I format the function the_time?
I appriaciate your help