Support » Plugin: CSSable Countdown » how can i implement this?

  • Resolved delta123

    (@delta123)


    This is an example shortcode:

    [jcountdown timetext=”2015/8/1 15:31:20″ timezone=”1″ style=”flip” color=”black” width=”0″ textgroupspace=”6″ textspace=”0″ reflection=”false” reflectionopacity=”10″ reflectionblur=”0″ daytextnumber=”3″ displayday=”false” displayhour=”true” displayminute=”true” displaysecond=”true” displaylabel=”true” onfinishredirecturl=”http%3a%2f%2flocalhost%2f”]2015/8/1 15:31:20[/jcountdown]

    And I need to get the expiry date from a custom field, this can be done with the following code:

    get_post_meta(get_the_ID(), “clpr_expire_date”, true);

    In fact to me more specific to pass such custom field value to an external variable, you can do this:

    <?php
    $expiryDATE = get_post_meta(get_the_ID(), “clpr_expire_date”, true);
    echo ‘Expiry date : ‘.$expiryDATE;
    ?>
    Example Output>> Expiry date : 2014-12-31

    Now as I’m not a programmer, the following code does not seem to work, can you help me get this to work, step by step?

    <script type=”text/javascript”>
    $expiryDATE = get_post_meta(get_the_ID(), “clpr_expire_date”, true);
    </script>
    [jcountdown timetext=$expiryDATE” 15:31:20″ timezone=”1″ style=”flip” color=”black” width=”0″ textgroupspace=”6″ textspace=”0″ reflection=”false” reflectionopacity=”10″ reflectionblur=”0″ daytextnumber=”3″ displayday=”false” displayhour=”true” displayminute=”true” displaysecond=”true” displaylabel=”true” onfinishredirecturl=”http%3a%2f%2flocalhost%2f”]2015/8/1 15:31:20[/jcountdown]

    Another thing i have a third party plugin installed called php widget, so i could execute php code in a widget if is needed.

    Thank You

    https://wordpress.org/plugins/cssable-countdown/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think I made some progress but still cannot get it to work.

    The following code:

    <?php
    $expiryDATE = get_post_meta(get_the_ID(), “clpr_expire_date”, true);
    echo ‘Expiry date : ‘.$expiryDATE;
    echo do_shortcode(‘[jcountdown timetext=”.$expiryDATE.” timezone=”1″ style=”flip” color=”black” width=”0″ textgroupspace=”6″ textspace=”0″ reflection=”false” reflectionopacity=”10″ reflectionblur=”0″ daytextnumber=”3″ displayday=”false” displayhour=”true” displayminute=”true” displaysecond=”true” displaylabel=”true” onfinishredirecturl=”http%3a%2f%2flocalhost%2f”]2015/8/1 15:31:20[/jcountdown]’);
    ?>

    is running in the widget but the clock is set to 00:00:00

    Any tips how to get this resolved?

    Plugin Author dmonnier

    (@dmonnier)

    This is not my plugin. My plugin is CSSable Countdown, not jcountdown. Please ask that plugin’s author for help.

    dmonnier, thanks for pointing that out, in case you have not been following my other postings trying to resolve my issue, your plugin still does not work with my child theme and you have not provided me solution, I’m prepared to ditch my child theme if you can get your plugin to work in the same way as i described above, is essential that i pass the expiry date parameter to the countdown plugin.

    how can i do this with your plugin?

    My code above partially works but as explained i cannot get part of the the date held in the variable to work… in the case of your plugin, I don’t have any code to put into my text or php widget, please provide me the exact code for me to use.

    Thank you

    If the above request is above your programming knowledge please just say so and I won’t pursue this any further with you.

    dmonnier, are you following this support tread?

    Can you please help me implement this requirement with your plugin?

    basically i just need to pass the expiry date value which is stored in a variable to your plugin, this code i put together can retrieve the date value and display it in a text widget:

    <?php
    $expiryDATE = get_post_meta(get_the_ID(), “clpr_expire_date”, true);
    echo ‘Expiry date : ‘.$expiryDATE;
    ?>

    If I don’t hear back from you, I and everyone here that is following this thread, can assume that this coding request is well above your coding skills… meanwhile I will continue to wait to hear back from you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how can i implement this?’ is closed to new replies.