Home Forums WoodMart support forum How to set the countdown timer in line with the price on single product page

How to set the countdown timer in line with the price on single product page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #314197

    HARSLE
    Participant

    how to change the position of the countdown timer

    Attachments:
    You must be logged in to view attached files.
    #314310

    Artem Temos
    Keymaster

    Hello,

    Please add this code to the functions.php of the child theme.

    if ( ! function_exists( 'wd_replacement_price_countdown' ) ) {
       /**
        * Replacement of price and countdown
        */
       function wd_replacement_price_countdown() {
          remove_filter( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
          remove_filter( 'woocommerce_single_product_summary', 'woodmart_single_product_countdown', 15 );
    
          add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 12 );
          add_action( 'woocommerce_single_product_summary', 'woodmart_single_product_countdown', 11 );
       }
    
       add_action( 'wp', 'wd_replacement_price_countdown', 1001 );
    }

    Regards.

    #314317

    HARSLE
    Participant

    you just put the countdown timer on the top of the price, not in line with the price

    Attachments:
    You must be logged in to view attached files.
    #314463

    Artem Temos
    Keymaster

    Hello,

    Please remove the previous php code and try adding the following Custom CSS in the Global Custom CSS area under Theme Settings >> Custom CSS.

    .summary-inner > .price,
    .summary-inner > .wd-timer {
    	display: inline-block;
    	vertical-align: middle;
    }
    
    .summary-inner > .price {
    	margin-right: 15px;
    }

    Regards.

Viewing 4 posts - 1 through 4 (of 4 total)