Give help. Get help.

  • # June 11, 2013 at 1:35 pm

    I’m creating a temporary page for my site, to be something professional while I develop the main site. It will all be WP based.

    I want to run a countdown timer on the temp site but don’t know which direction to go. Since it’ll be a WP site, a WP Plugin makes sense. But would it be better to hard code something with JQuery or something?

    I’m fairly competent and learning but am not a pro so any advice/guidance is great appreciated.

    So, WP Plugin vs. JQuery (or other) hard code solution?

    # June 11, 2013 at 3:52 pm

    //place function in functions.php
    function countdown_to_launch($month, $day, $year)
    $today = time();
    $launch_date = mktime(0,0,0,$month,$day,$year);
    $difference = ($launch_date – $today);
    $number_of_days = (int)($difference/86400);

    echo “

    Launch in {$number_of_days} days


    //call the function in your template files

    Simple time difference countdown. Not sure if you need it to be interactive, then you might decide to go with JavaScript.

    # June 18, 2013 at 11:52 am

    Thanks to both FragaGeddon and AlenAbdula for the info. Big help.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.