Getting Floating Labels back
-
The Flatsome theme offers a neat and more compact label layout option called Floating Labels that actually I prefer than the standard labels in Fluid Checkout. For example: https://postimg.cc/KRx7nc2T
When the checkout page loads with Fluid Checkout in multi-step mode, the nicer Floating Labels appear for a few seconds but then revert back to defaults, presumably as they get dynamically suppressed by something in the plugin code. (The style switching looks a bit clunky, too.)
I see you already offer Flatsome compatibility with
compat-theme-flatsome.php
, but I’m yet unable to find the pertinent snippet of code to switch off said suppressor.Could you please hint how to get the Floating Labels back?
Thanks.
PS. For reference, this is the Flatsome code that appears to implement the Floating Labels:
themes\flatsome\inc\woocommerce\structure-wc-checkout.php
/* Floating labels option */ function flatsome_checkout_scripts() { if(is_checkout() && get_theme_mod('checkout_floating_labels', 0)) { wp_enqueue_script( 'flatsome-woocommerce-floating-labels', get_template_directory_uri() .'/assets/libs/float-labels.min.js', array( 'flatsome-theme-woocommerce-js' ), '3.5', true ); wp_dequeue_style( 'selectWoo' ); wp_deregister_style( 'selectWoo' ); wp_dequeue_script( 'selectWoo' ); wp_deregister_script( 'selectWoo' ); } } add_action( 'wp_enqueue_scripts', 'flatsome_checkout_scripts', 100 ); function flatsome_checkout_body_classes( $classes ) { if( is_checkout() && get_theme_mod('checkout_floating_labels', 0)) { $classes[] = 'fl-labels'; } return $classes; } add_filter( 'body_class', 'flatsome_checkout_body_classes' );
- The topic ‘Getting Floating Labels back’ is closed to new replies.