Learn Display Post Date Time In WordPress. Here you will ready to
peruse about WordPress indicate post-overhaul time rather than
distributed date. Besides, you see the web WordPress use for some
reasons like for news, sites or business sites. So when you roll out
improvements in your blog. At that point, you likewise need to show
redesign date in your article. So in this instructional exercise, you
will perceive how to about WordPress indicate the post-redesign time.
Besides, observe a case on the off chance that you distributed an article on Feb 20, 2015, and make a few redesigns in it following a week. At that point clearly, you need to show date Feb 27, 2015, rather than distributed date. So here you will see the technique how to do?
Besides, observe a case on the off chance that you distributed an article on Feb 20, 2015, and make a few redesigns in it following a week. At that point clearly, you need to show date Feb 27, 2015, rather than distributed date. So here you will see the technique how to do?
Display Post Date Time In WordPress
Presently read WordPress indicate post-redesign time by altering the underneath records. To start with, you have to get to the underneath records for rolling out a few improvements in it:- single.php
- page.php
- index.php
<?php the_modified_time('F jS, Y');?>Now just replace the above code with the below one:
<?php $u_time = get_the_time('U'); $u_modified_time = get_the_modified_time('U'); if ($u_modified_time >= $u_time + 86400) { echo "and last modified on "; the_modified_time('F jS, Y'); echo " at "; the_modified_time(); echo ", "; } ?>This was the method WordPress show post update time and date instead of instead of published date. Now just see if you want to show just date not time then place the below code:
<?php $u_time = get_the_time('U'); $u_modified_time = get_the_modified_time('U'); if ($u_modified_time >= $u_time + 86400) { echo "and last modified on "; the_modified_time('F jS, Y'); } ?>Be that as it may, in the event that you have neglected to discover the code in your these records. At that point perceive how to change it. Frequently apprentice doesn't follow out the code. Incidentally, on the off chance that you are utilizing Sahifa layout. At that point simply take after the course to get the subtle elements. After it simply change to it the above code which you have perused. Read complete article here: WordPress Show Post Update Time
No comments:
Post a Comment