[SCRIPT] Automatic Date Changer - TESTED !
2015-02-08, 09:29 AM, (This post was last modified: 2015-02-08, 09:30 AM by WhiteHatSEO.)
#1
Hi Everyone ,

Just want to share a script i use on my sites

that changes date and time AUTOMATICALLY EVERY DAY.

Last Updated: (todays date, automatically changed every day)


How to make the date change automatically:
Just paste this code wherever you want it to display :

Code:
<b>Last Updated On:
</b><script type="text/javascript"> var d=new Date(); var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday", "Saturday"); var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); document.write(weekday[d.getDay()] + " "); document.write(d.getDate() + ". "); document.write(monthname[d.getMonth()] + " "); document.write(d.getFullYear());</script>

For wordpress sites , you have paste into the theme editor files.
Latest Thanks - View all

honeydew(2016-04-07 04:46 PM) JaxTeller(2015-07-24 11:33 PM) TotalTrue(2015-02-10 11:40 PM) 
Reply
2015-02-08, 09:30 AM,
#2
Thanks. Can this be use in blogger post? Like I paste it to html editor?
Latest Thanks - View all

honeydew(2016-04-07 08:26 PM) 
Reply
2015-02-08, 09:48 AM,
#3
(2015-02-08, 09:30 AM)WarAffiliate Wrote: Thanks. Can this be use in blogger post? Like I paste it to html editor?


Definitely , Works in the HTML Editor perfectly , Try It!
Reply
2015-02-08, 09:52 AM,
#4
(2015-02-08, 09:48 AM)TheSEOGuru Wrote:
(2015-02-08, 09:30 AM)WarAffiliate Wrote: Thanks. Can this be use in blogger post? Like I paste it to html editor?


Definitely , Works in the HTML Editor perfectly , Try It!

Thanks I will be adding it to my next landing page. Thank you thank you :)
Reply
2015-02-08, 12:07 PM, (This post was last modified: 2015-02-08, 01:07 PM by BlackHatSEO.)
#5
(2015-02-08, 09:29 AM)TheSEOGuru Wrote: For wordpress sites , you have paste into the theme editor files.

Don't use this JavaScript code on Wordpress sites, use one single PHP date() call for this instead.

Google can't recognize all parts of JavaScript code (like Flash, too), so it's worthless if you want to have the date of the last update being displayed for SEO purposes or inside the snippet. PHP is being interpreted at server side. Wordpress is written in PHP, so there is no problem with a lack of PHP support.

This place is intentionally left blank.
Reply
2015-02-08, 12:19 PM,
#6
(2015-02-08, 12:07 PM)BlackHatSEO Wrote:
(2015-02-08, 09:29 AM)TheSEOGuru Wrote: For wordpress sites , you have paste into the theme editor files.

Don't use this JavaScript code on Wordpress sites, use one single PHP date() call for this instead.

Google can't recognize all parts of JavaScript code (like Flash, too), so it's worthless if you want to have the date of the last update being displayed for SEO purposes or inside the snippet. PHP is being interpreted at server side. Wordpress is written in PHP, so there is no problem with a lack of PHP support.

A guy named "The SEO Guru", claiming to be "the best SEO" in another thread, should really know this.
I'm using WP for multiple niches site. Can you share PHP script? It would be very appreciated.
Reply
2015-02-08, 12:39 PM,
#7
(2015-02-08, 12:19 PM)hieu230592 Wrote: I'm using WP for multiple niches site. Can you share PHP script? It would be very appreciated.

I don't want to hijack this thread. But I'm going to post it for you personally, because you requested a post. ;-)

Code:
<b>Last Updated On: <?php echo date("l j. M Y"); ?></b>


Note 1: "l" is the lower letter "L"


Note 2: This code works only if the timezone setting of Wordpress (or other PHP based scripts) is done, otherwise a warning (no error) is displayed.


Note 3: You can easily customize the output, please have a look here:

http://php.net/manual/en/function.date.php

Personally I use:

Code:
<b>Last updated on: <?php echo date("l, j. F Y"); ?></b>

This place is intentionally left blank.
Reply
2015-02-08, 12:42 PM,
#8
Thanks guys, this is one of the trick to let others about the new updates.

[Image: ytsrcpae_500x90.jpg]
Reply
2015-02-08, 12:56 PM,
#9
(2015-02-08, 12:42 PM)Krrish Wrote: Thanks guys, this is one of the trick to let others about the new updates.

BTW: If you want to rank at Google with your article and want to reduce the bounce rate, then insert my PHP code (a bit modified) into your "description" meta-tag.

Example:

Code:
<meta name="description" content="<?php echo date("j.m.Y"); ?> - This website offers ... ">

This won't work with JavaScript.

This place is intentionally left blank.
Reply
2015-02-08, 03:05 PM,
#10
BlackHatSEO

I`ve added your PHP script code inside my Wordpress post and it doesn`t show.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [FREE] Cloak Script Watt 44 3,374 6 hours ago
Last Post: ichalz
  [GET] Youtube Upload Imacros Script Trex 41 14,495 2017-12-08, 11:37 PM
Last Post: manjeshsingh
  [GET] HQ PHP Script - Watch Movies Online - GROF 55 18,337 2017-11-26, 12:04 PM
Last Post: botxtrem
  [TEMPLATE] Online Generator With Force Like and Share Script and Connect to FB Twisted Fate 61 8,920 2017-11-17, 10:48 PM
Last Post: grenadez
  Youtube 2016 How to avoid delete (100% working and tested) Hektor26 28 7,244 2017-11-11, 01:13 PM
Last Post: Tag9J222YLUL





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top