Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @odeeee,
    in theme customization countdown box “Time for Wedding Ceremony” use format HH:mm (ex. 15:30).

    Hello @luispv,
    you could edit file simplyCountdown.js and simplyCountdown.min.js in theme/js folder in this way:

    words: {days: “day”, hours: “hour”, minutes: “minute”, seconds: “second”, pluralLetter: “s”} -> words: {days: “día“, hours: “hora“, minutes: “minuto“, seconds : “segundo“, pluralLetter: “s”}

    Best regards,
    Marco

    Hello Paolo,
    I had The same issue and looking into code I found out that is not a bug but a not developed option.

    Step to add countdown time manage option

    – Edit file simplyCountdown.js and simplyCountdown.min.js in theme/js folder:
    enableUtc: !0 -> enableUtc: !1

    -Edit custom.js adding line in bold for manage hours and minutes:

    jQuery(document).ready( function() {
    // Wedding Countdown
    var wedding_year = dt_countdown_date.dt_countdown_year;
    var wedding_month = dt_countdown_date.dt_countdown_month;
    var wedding_day = dt_countdown_date.dt_countdown_day;
    var wedding_hours = dt_countdown_date.dt_countdown_hours;
    var wedding_minutes = dt_countdown_date.dt_countdown_minutes;

    jQuery( ‘#dt_wedding_day’ ).simplyCountdown({
    year: wedding_year,
    month: wedding_month,
    day: wedding_day,
    hours : wedding_hours,
    minutes : wedding_minutes

    });

    – Edit file customizer.php in theme/inc folder adding line in bold in order to manage time in theme option menu:

    // Wedding Count Down
    $wp_customize->add_section(‘dt_countdown’, array(
    ‘title’ => __( ‘Wedding Count Down’, ‘together’ ),
    ‘priority’ => 62
    ));

    // Date Picker
    $wp_customize->add_setting( ‘dt_countdown_setting’, array(
    ‘sanitize_callback’ => ‘together_sanitize_text’,
    ‘capability’ => ‘edit_theme_options’
    ));

    $wp_customize->add_control( new together_DateControl( $wp_customize, ‘dt_countdown_setting’, array(
    ‘label’ => __( ‘Wedding Count Down Date Picker’, ‘together’),
    ‘section’ => ‘dt_countdown’,
    ‘settings’ => ‘dt_countdown_setting’,
    ‘type’ => ‘text’
    )));

    // Time Picker
    $wp_customize->add_setting( ‘dt_countdown_setting_time’, array(
    ‘default’ => ”,
    ‘capability’ => ‘edit_theme_options’,
    ‘sanitize_callback’ => ‘together_sanitize_text’
    ));

    $wp_customize->add_control( ‘dt_countdown_setting_time’, array(
    ‘priority’ => 6,
    ‘type’ => ‘text’,
    ‘label’ => __( ‘Wedding Count Down Time Picker’, ‘together’ ),
    ‘settings’ => ‘dt_countdown_setting_time’,
    ‘section’ => ‘dt_countdown’
    ));

    ……………….

    function together_load_scripts() {

    wp_register_script( ‘dt_countdown_handle’, get_template_directory_uri() .’/js/custom.js’, array( ‘jquery’ ), ”, true );

    // Localize the script with new data
    $translation_array = array(
    ‘dt_countdown_year’ => date( “Y”, strtotime( get_theme_mod( ‘dt_countdown_setting’ ) ) ),
    ‘dt_countdown_month’ => date( “n”, strtotime( get_theme_mod( ‘dt_countdown_setting’ ) ) ),
    ‘dt_countdown_day’ => date( “j”, strtotime( get_theme_mod( ‘dt_countdown_setting’ ) ) ),
    ‘dt_countdown_hours’ => date( “H”, strtotime( get_theme_mod( ‘dt_countdown_setting_time’ ) ) ),
    ‘dt_countdown_minutes’ => date( “i”, strtotime( get_theme_mod( ‘dt_countdown_setting_time’ ) ) )

    );
    wp_localize_script( ‘dt_countdown_handle’, ‘dt_countdown_date’, $translation_array );

    // Enqueued script with localized data.
    wp_enqueue_script( ‘dt_countdown_handle’ );

    }

    I hope this could be useful

    Beste regards,
    Marco

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