How to get post date in WordPress?
1 answer
Use the_date()
or get_the_date()
functions, Directly:
<?php the_date(); ?>
or wrap it with a tag h2
(for example):
<?php get_the_date('F M Y', '<h2>', '</h2>'); ?>
+5
source to share