The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. Wordpress shortcode or plugin for current time

    Wordpress shortcode or plugin for current time

    Web Design
    5 4 3.2k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KeriMorgret
      KeriMorgret last edited by

      In the footer of my WP site at http://www.strikemodels.com/, I have

      "Questions? Call us at xxx-xxx-xxxx 10:00 am to 8:00 pm Pacific time or email [address]"

      I've searched, but haven't easily found a shortcode where I can insert the current time for my time zone in this footer statement. Does anyone know if such a thing exists?

      The Do Not Disturb function on the iPhone has been a big help, but we've still had calls at three in the morning from someone in Australia on New Year's Day who didn't know how to look up time differences online.

      1 Reply Last reply Reply Quote 0
      • Vahe.Arabian
        Vahe.Arabian last edited by

        Hi Kerry,

        I'm no expert at this solution, but I found this link which might help with your situation - http://botcrawl.com/display-date-and-time-on-wordpress-using-php-shortcodes/

        They basically use php functions so that it shows your sites server actual time and date rather than the users.

        BTW that person from Australia wasn't me 😛

        Hope this helps.

        Regards,

        Vahe

        1 Reply Last reply Reply Quote 0
        • AlanMosley
          AlanMosley last edited by

          It wasn't me either.

          $thetimeis = getdate(time()); $thehour = $thetimeis['hours']; $theminute = $thetimeis['minutes']; $thesecond = $thetimeis['seconds'];
                  if($thehour > 12){ $thehour = $thehour - 12; $dn = "PM";
                  }else{ $dn = "AM";
                  }

          echo "$thehour: $theminute:$thesecond$dn"; ?>

          1 Reply Last reply Reply Quote 0
          • MattAntonino
            MattAntonino last edited by

            Can't you use this function:

            https://codex.wordpress.org/Function_Reference/current_time

            1 Reply Last reply Reply Quote 0
            • KeriMorgret
              KeriMorgret last edited by

              Thanks everyone! Will check these out when I get a chance, prepping for SMX West at the moment.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Amp plugins + Wordpress = speed, rankings, results
                Sernukers
                Sernukers
                0
                7
                91

              • Custom HTML or WordPress, it's Time to Decide
                lcallander
                lcallander
                0
                4
                147

              • Sitemap Wordpress
                BlueprintMarketing
                BlueprintMarketing
                0
                3
                228

              • Wordpress Plugin To Capture Form Completion Data, Before Visitor Hits "Submit"?
                KeriMorgret
                KeriMorgret
                0
                5
                1.2k

              • WordPress and Redirects
                evolvingSEO
                evolvingSEO
                0
                14
                149

              • Wordpress Custom Permalinks Plugin Issue
                ec1976
                ec1976
                0
                8
                479

              • About wordpress database
                godreamvacations
                godreamvacations
                0
                2
                102

              • Finally have a budget for a great seo ecommerce site but need help choosing wordpress, joomla, modx, magneto or? Thank you in advance for your generosity of time
                buzzmediallc
                buzzmediallc
                1
                34
                4.0k

              Get started with Moz Pro!

              Unlock the power of advanced SEO tools and data-driven insights.

              Start my free trial
              Products
              • Moz Pro
              • Moz Local
              • Moz API
              • Moz Data
              • STAT
              • Product Updates
              Moz Solutions
              • SMB Solutions
              • Agency Solutions
              • Enterprise Solutions
              • Digital Marketers
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority Checker
              • Local Citation Checker
              • MozBar Extension
              • MozCast
              Resources
              • Blog
              • SEO Learning Center
              • Help Hub
              • Beginner's Guide to SEO
              • How-to Guides
              • Moz Academy
              • API Docs
              About Moz
              • About
              • Team
              • Careers
              • Contact
              Why Moz
              • Case Studies
              • Testimonials
              Get Involved
              • Become an Affiliate
              • MozCon
              • Webinars
              • Practical Marketer Series
              • MozPod
              Connect with us

              Contact the Help team

              Join our newsletter
              Moz logo
              © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy