By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
DaiLy4mativeDaiLy4mative
  • Home
  • News
    • Business
    • Entertainment
    • Education
    • Sports
    • Health
  • TRAVEL
  • Books
  • Biography
Reading: Carrington Mobile Theme Customization: Add date and time on the header
Share
Notification Show More
Latest News
Ifeanyi Obike Biography, Networth, Business, Education, Contributions To Humanity and More
March 27, 2023
TrumpArrest Trend On Twitter: Factual Information About Former US President Trump Trend On Twitter
March 22, 2023
Video Guide: Hollywood Top Up Vouchers, how they work, where you can buy them, and where your nearest retailer is!
March 20, 2023
What’s Good About HollywoodBets: Factors That Makes Hollywoodbets a consistent favorite among Bettors over the years
March 20, 2023
How Much Does Bad Bunny Charge For a Show
March 20, 2023
DaiLy4mativeDaiLy4mative
Watch TV
  • Information
  • Education
  • Books
  • Business
  • COMPANIES
  • Education
  • Health
  • Lyrics
  • News
  • TRAVEL
  • More
    • BANKS
    • MP3 Download
    • News
    • Uncategorized
Have an existing account? Sign In
Follow US

Carrington Mobile Theme Customization: Add date and time on the header

Carrington Mobile theme
SHARE
- Advertisement -

To customize Carrington mobile theme with date and time feature that updates in realtime please follow below steps. Putting date andtime on your wordpress theme has become very easy where there are so many args that can call up real time and date just however you want it.
It may not be easy to do this especially if you are not a developer but I have simplified it and provided you with the exact code that I am using on daily4mative.com. With less talk let’s do more action.

Steps to customize Carrington mobile theme with Date and time.

NB: Please note that this works in every theme.

    1. Log in to your cPanel.
  1. Locate your header.php file
  2. Inside it scroll to the place you want it to appear and
  3. finally add below code I provided for you.
Related Article Gaming Lenses: All You Need To Know About The XP Pro Lens For Gamers

<script type=”text/javascript”>
var tday=[“Sunday”,”Monday”,”Tuesday”,”Wednesday”,”Thursday”,
“Friday”,”Saturday”];
var tmonth=[“January”,”February”,”March”,”April”,”May”,”June”,”July”,
“August”,”September”,”October”,”November”,”December”];
function GetClock(){
var d=new Date();
var nday=d.getDay(),nmonth=d.getMonth(),ndate=d.getDate(),
nyear=d.getFullYear();
var nhour=d.getHours(),nmin=d.getMinutes(),nsec=d.getSeconds(),ap;
if(nhour==0){ap=” AM”;nhour=12;}
else if(nhour<12){ap=” AM”;} else if(nhour==12){ap=” PM”;} else if(nhour>12){ap=” PM”;nhour-=12;}
if(nmin<=9) nmin=”0″+nmin;
if(nsec<=9) nsec=”0″+nsec;
var clocktext=”<span style=”font:12pt Arial; color:#fff;”>”+tday[nday]+”, “+tmonth[nmonth]+”
“+ndate+”, “+nyear+”</span> <span style=”font:12pt Arial; color:#fff; background: #3e3; border-radius: 5px;padding: 2px;”>”+nhour+”:”+nmin+”:”+nsec+ap+”</span>”;
document.getElementById(‘clockbox’).innerHTML=clocktext;
}
GetClock();
setInterval(GetClock,1000);
</script>

You Might Also Like

Gaming Lenses: All You Need To Know About The XP Pro Lens For Gamers

French startup Alan Plans to build healthcare super app with €183 million funding that will cater for all questions for your health

6 easy steps to block your IP address from Google Analytics

Why Facebook, Instagram and Whatsapp is down

TWRP Recovery: twrp restore stock recovery, solution and best practices

TAGGED: Carrington Mobile Theme
Eric September 17, 2019
Share this Article
Facebook Twitter Whatsapp Whatsapp Email Print
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest Post

  • Ifeanyi Obike Biography, Networth, Business, Education, Contributions To Humanity and More
  • TrumpArrest Trend On Twitter: Factual Information About Former US President Trump Trend On Twitter
  • Video Guide: Hollywood Top Up Vouchers, how they work, where you can buy them, and where your nearest retailer is!
  • What’s Good About HollywoodBets: Factors That Makes Hollywoodbets a consistent favorite among Bettors over the years
  • How Much Does Bad Bunny Charge For a Show

© Daily4mative. All Rights Reserved.

Removed from reading list

Undo
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Register Lost your password?