WordPress.org

Ready to get started?Download WordPress

Forums

Countdown Timer
[resolved] single and distinct timers per post (6 posts)

  1. xenakis
    Member
    Posted 2 years ago #

    Hi,

    First of all, great plugin, so thank you to Andrew Ferguson for creating it.

    I want to be able to insert a different timer (distinct end time) on each post that I create. While I am able to insert multiple distinct timers on a single post using

    <?php function_exists('fergcorp_countdownTimer')?fergcorp_countdownTimer(##):NULL; ?>

    with the '##' representing the number of timers created on the Settings page, I can not place single timers standalone on specific posts. If I have three timers set up on the Settings page, and replace the '##' with '03', I get all three timers. How would I pull out JUST the first timer?

    I've also tried using

    fergcorp_cdt_single date="ENTER_DATE_HERE"

    but just cannot figure out the right syntax. I've tried

    <?php function_exists('fergcorp_countdownTimer') fergcorp_cdt_single date="[date here]"; ?>

    to no avail.

    Would appreciate any help on how to get single, distinct timers on multiple posts. Thanks!

    http://wordpress.org/extend/plugins/countdown-timer/

  2. fergbrain
    Member
    Plugin Author

    Posted 2 years ago #

    @xenakis:

    [fergcorp_cdt_single date="ENTER_DATE_HERE"] is a shortcode that you should place in the content of your blog post or page. Valid examples of "ENTER_DATE_HERE" are anything parseable by http://php.net/manual/en/function.strtotime.php

    With regard to using fergcorp_countdownTimer(##), setting ## to 1 will provide just the first timer.

    You can read more here: http://wordpress.org/extend/plugins/countdown-timer/installation/

  3. xenakis
    Member
    Posted 2 years ago #

    @fergbrain:

    thanks, Andrew. I'm sorry, but i can't get that to work...can you quickly tell me the exact line of code that i would need to use, say for June 1, 2012? i've tried using php-parseable date formats. e.g.

    [fergcorp_cdt_single date="June 1, 2012"]

    but seem to only see that exact string ("[fergcorp_cdt_single date="June 1, 2012"]) to show up on the actual wordpress page.

    I understand I should not use the below:

    <label><?php function_exists('fergcorp_countdownTimer')?fergcorp_countdownTimer(01):NULL; ?></label>

    But do I need to embed the single date line of code somewhere within that? I'm really just looking for one example line of code using fergcorp_cdt_single

    Thank you so much...this would be a great help!

  4. fergbrain
    Member
    Plugin Author

    Posted 2 years ago #

    @xenakis:

    That example parses correctly for me. Are you using the Edit Post page to enter [fergcorp_cdt_single date="June 1, 2012"]? Can you post a screen shot of where you're entering the shortcode and what the output looks like?

  5. xenakis
    Member
    Posted 2 years ago #

    Andrew,

    I figured it out...I was placing the shortcode into the HTML, not the actual Edit Post page...dumb mistake.

    Thank you!

  6. fergbrain
    Member
    Plugin Author

    Posted 2 years ago #

    No worries!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic