How To Add DATE FUNCTION To A Wordpress Website - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › How To Add DATE FUNCTION To A Wordpress Website (383 Views)
1 Reply
| How To Add DATE FUNCTION To A Wordpress Website by APHATHEOLOGY(op): 12:20pm On Mar 28, 2016 |
A trend of displaying current date which was started with newspapers has been adapted by many blogs. As more and more users are using WordPress to create magazine style theme, this is just one of the features that can be a great addon to your site. Having a current date looks professional, and it is certainly useful if your articles are dated. You might think that adding a date to WordPress is hard and will require multiple steps, but it is a short and simple method. In this article, we will share a snippet that will allow you to display today’s date in WordPress or any other PHP based website. All you need to do is place the following code in a theme file of your choice, most commonly in header.php: Code: <?phpechodate('l jS F Y'); ?> The above code will display the date in the following format: Thursday, 20th September 2014 If you do not like the formatting above, you can look at the PHP Date Manual for other parameters. Now another way to do this is by just extracting your WordPress admin settings. You can go to Settings > General and select the date format in there and simply add this code instead of the above one Code: <?phpechodate(get_option('date_format')); ?> Did you know any other easier method? Lets learn from you
|
| Re: How To Add DATE FUNCTION To A Wordpress Website by APHATHEOLOGY(op): 2:28pm On Mar 28, 2016 |
Hope its useful |
Get A Wordpress Website Now For Just 8000ngn • How To Add Date And Time On Your Website • Add Date To My Website • 2 • 3 • 4
Naija Non Hosted Account Available For Sale • More Adsense Available • Get 100% Money-back Training Guarantee