how to add custom css at top above all css file for specific url

/** * Enqueue stylesheet before others */ class EnqueueStylesheetEarly { function __construct() { add_action( ‘wp_enqueue_scripts’, [ $this, ‘load_before_other_stylesheets’ ], 5 ); } /** * Register and enqueue stylesheet */ function load_before_other_stylesheets() { wp_register_style( ‘bootstrap-css’, plugin_dir_url( __FILE__ ) . ‘bootstrap.min.css’, [], ‘3.3.7’ ); wp_enqueue_style( ‘bootstrap-css’ ); } } Then you can load this with your other … Read more

Problem with conditional woocommerce custom checkout field

Ok, I figured it out (finally) Instead of using the code above to add a new custom field, I changed it to this: add_filter( ‘woocommerce_checkout_fields’, ‘custom_override_checkout_fields’ ); function custom_override_checkout_fields ( $fields ) { $fields[‘order’][‘the_script’] = array ( woocommerce_form_field ( ‘the_script’, array( ‘type’ => ‘textarea’, ‘class’ => array(‘extracheckoutinfo form-row-wide’), ‘label’ => __(‘What is the script?’), ‘placeholder’ … Read more