I have som problems with the date functions in wordpress.
I am trying to get different format on the post date on some pages and i have been trying "the_date()","the_time()" and "echo get_the_date()". They all behave in the same way.
They output the correct date format when i just type for example the_time(). The output is the format i had setup in wordpress settings, as expected.
The problems is that when i try to format the output by ex: the_time('d') the output is "d" or echo get_the_time('F j, Y'); the output is "'F j, Y'".
I forgot to mention that the code is inside "the loop"
This is my page.php
<?php get_header();?> <?php get_sidebar('subnav');?> <section class="main-content2" id="page"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h1><?php the_title();?></h1> <?php the_content();?> <footer class="meta">Publicerades den <?php echo get_the_date('d');?></footer> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </section> <?php get_footer();?>
I cannot understand what the problem is, please help!:)