Thanks for the kind words ??
You can use HTML in the expiry text field, but in order to use the plugin as-is in a template, you’ll still have to use do_shortcode()
.
// check if the target date is expired
if ( mktime( H,i,s,n,J,Y ) < mktime() ) {
// do expired stuff
} else {
echo do_shortcode( '[countdown date="MM/DD/YYYY" ...]' );
}
(Of course, this doesn’t take into account timezones or countup versions… you can modify as necessary with gmmktime()
and switch operands.)
Alternatively, you can build the jQuery call yourself in templates. The plugin is built on top of Keith Wood’s jQuery Countdown (version 1.6.3), so if you have the plugin activated (or the jQuery scripts included), you can do something like this in your templates:
<div id="cssable-countdown" class="cssable-countdown layout-type_default">
<!-- do stuff you want showing regardless of countdown status -->
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#cssable-countdown').countdown({
until: new Date(2015, 12, 31, 0, 0, 0, 0),
timezone: '-5',
format: 'yOWD',
alwaysExpire: 'true',
expiryText: '<div id="timeExpired"><!-- stuff you only want showing if expired --></div>',
});
});
</script>
Does that help you?