add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && is_category()) { $sticky_posts = get_option(‘sticky_posts’); if (!empty($sticky_posts)) { add_filter(‘posts_orderby’, function($orderby, $query) use ($sticky_posts) { if (!is_admin() && $query->is_main_query() && is_category()) { global $wpdb; $sticky_list = implode(‘,’, array_map(‘intval’, $sticky_posts)); return “FIELD({$wpdb->posts}.ID, {$sticky_list}) DESC,…Continue reading
/* 1) Smartbill plugin: multiple changes in at least includes/class-smartbillutils.php 2) woocommerce-side-cart-premium plugin cand Flyingpress serveste cache …cartul se va actualiza later ptr ca delayed JS/CSS deci nu trebuie sa afisez cart count daca = 0 nu vreau sa afisez…Continue reading
add_filter( ‘woocommerce_checkout_fields’, ‘rd_email_first_for_checkout’ ); function rd_email_first_for_checkout( $checkout_fields ) { $checkout_fields[‘billing’][‘billing_email’][‘priority’] = 25; return $checkout_fields; }Continue reading
// Add custom styles if ( ! function_exists( ‘add_custom_style_normalize’ ) ) { function add_custom_style_normalize() { // The New Normal CSS wp_register_style( ‘the-new-normal-css’, ‘https://cdn.jsdelivr.net/gh/sarahschopick/the-new-normal.css@main/the-new-normal.min.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘the-new-normal-css’ ); // Alternative normalization stylesheets (only use one) // Normalize: https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css //…Continue reading
/** * Class that handles wholesale price HTML generation and display. * * @since 1.0.0 */ class WWP_Wholesale_Price_HTML_Handler { /** * Model that houses the logic of retrieving information relating to wholesale role/s of a user. * * @since 1.5.0…Continue reading