How to use countdown into PHP file?
There are 2 ways to use as PHP function:
First:
$args = array(
'id' => 'uniqueIDHERE',
'title' => "Title Here",
'title_icon' => '',
'counter' => 'until',
'until' => array( 12, 27, 2013, 16, 53 ), // month, date, year, hour, second
'cLabels' => array( 'Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds' ),
'cLabels1' => array( 'Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second' ),
'compactLabels' => array( 'y', 'm', 'w', 'd' ),
'format' => 'dHMS',
'expiryUrl' => '',
'expiryText' => '',
'alwaysExpire' => false,
'compact' => false,
'onExpiry' => '',
'onTick' => '',
'tickInterval' => 1,
'bg_color' => '#f6f7f6',
'counter_image' => '',
'counter_color' => '#444444',
'label_color' => '#444444',
);
echo the_countdown_pro( $args );
Second: Use the shortcode generator to help you generate the shortcode attributes and do action to the shortcode function:
do_shortcode('[countdown id="1377772338" format="dHMS" serverSync="true" alwaysExpire="false" compact="false" tickInterval="1" font_size="24" bg_color="#f6f7f6" counter_color="#444444" label_color="#444444" counter="until" until="12,27,2013,16,53" labels="Years,Months,Weeks,Days,Hours,Minutes,Seconds" labels1="Year,Month,Week,Day,Hour,Minute,Second" compactLabels="y,m,w,d"]');
NOTE: Please drag one widget to your sidebar OR Inactive Widgets area to pull the countdown scripts and styles.