i want to get post Publish Date like 22 Oct 2014 after the Post title.
i am using the_title();
for the post title
But how can i get this date ?
Using the the_date() and get_the_date() Functions The function get_the_date() returns the date for all posts, even if they are published on the same date. However, you need to use echo get_the_date() to output the date.
Open any WordPress posts and find the “Remove Meta and Date” option in the publish box. Uncheck the “Remove Meta and Date” option to unhide the date and metadata. Or check the box to hide them. Using the 'Remove from Homepage' options, users can hide the dates from their Homepage posts.
To change the post date, go to the Posts option in the left toolbar > go to All Posts > hover over the post in question and select edit. Once you are in the post editor, look on the right side of the screen under the Publish section and find the published on date. Next to the date is an edit link. Hope that helps.
Showing Current Date, Day, or Time in WordPress You can add this simple code in your WordPress theme's template files where you want to display the time. <? php echo date (get_option( 'date_format' )); ?> This code simply prints the current date using the date format set in your WordPress settings.
Use the_date()
or get_the_date()
functions. Either directly:
<?php the_date(); ?>
or wrap it with <h2>
tag (for example):
<?php get_the_date('F M Y', '<h2>', '</h2>'); ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With