function auto_assign_remove_offers_category() { // Define the “Offers” category slug $offers_category_slug = ‘offers’; // Get the “Offers” category object $offers_category = get_term_by(‘slug’, $offers_category_slug, ‘product_cat’); // If the “Offers” category does not exist, create it if (!$offers_category) { wp_insert_term( ‘Offers’, // Category…Continue reading
add_filter( ‘aioseo_canonical_url’, ‘aioseo_filter_canonical_url’ ); function aioseo_filter_canonical_url( $url ) { return ”; }Continue reading
add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; }Continue reading
add_filter( ‘simpay_phone_countries’, function() { return array( ‘au’ => ‘Australia’, ); } );Continue reading
add_filter( ‘wpcode_snippet_output_html’, ‘do_shortcode’ );Continue reading
add_action( ‘woocommerce_cart_calculate_fees’,’dvsl_discounts’, 20, 1 ); function dvsl_discounts( $cart_object ) { if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ) return; // Email Discount $emails = array(‘[email protected]’, ‘[email protected]’); //Specify the email addresses here if ( in_array( wp_get_current_user()->user_email, $emails ) ) {…Continue reading
add_filter( ‘aioseo_breadcrumbs_trail’, ‘homeshop_breadcrumbs_trail’ ); function homeshop_breadcrumbs_trail( $crumbs ) { foreach ( $crumbs as &$crumb ) { if ( ‘homePage’ === $crumb[‘type’] ) { $siteLink = wp_parse_url( $crumb[‘link’] ); $crumb[‘link’] = $siteLink[‘scheme’] . ‘://’ . $siteLink[‘host’] . ‘/shop-displays/’; } } return…Continue reading
.parallax { background-image: url(“http://example.com/wp-content/uploads/2017/08/my-background-image.jpg”); height: 100%; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; margin-left:-410px; margin-right:-410px; } .parallax-content { width:50%; margin:0 auto; color:#FFF; padding-top:50px; }Continue reading
function adms_remove_wp_block_library_css(){ wp_dequeue_style( ‘wp-block-library’ ); wp_dequeue_style( ‘wp-block-library-theme’ ); wp_dequeue_style( ‘wc-blocks-style’ ); // Remove WooCommerce block CSS } add_action( ‘wp_print_styles’, ‘adms_remove_wp_block_library_css’, 100 );Continue reading