How to set the countdown timer in line with the price on single product page
-
how to change the position of the countdown timer
Attachments:
You must be
logged in to view attached files.
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.
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.
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.