Elementor Store Headers

// Add the woocommerce_before_main_content to the elementor wc-archive-products widget add_action( ‘elementor/widget/render_content’, function( $content, $widget ) { if ( ‘wc-archive-products’ === $widget->get_name() ) { // Run the hooks without outputting the code that `do_action` will want to do ob_start(); do_action(‘woocommerce_before_main_content’); $beforeMainContent…Continue reading

Min-Max Product Price (with decimal support)

add_filter( ‘wcv_product_price’, ‘price_min_max’ ); function price_min_max( $args ) { $args[‘custom_attributes’] = array( ‘min’ => 3.2, ‘max’ => 200.21, ‘step’ => 0.01, ‘data-parsley-type’ => ‘number’, ‘data-parsley-range-message’ => __( ‘Price must be between 3.2 and 200.01’, ‘wcvendors-pro’ ), ‘pattern’ => ‘[0-9]+([\.,][0-9]+)?’, ‘type’…Continue reading

Goolge Tag

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date()); gtag(‘config’, ‘AW-1070680417’);Continue reading

Microsoft Advertising Tag

(function(w,d,t,r,u) { var f,n,i; w[u]=w[u]||[],f=function() { var o={ti:”343072545″, enableAutoSpaTracking: true}; o.q=w[u],w[u]=new UET(o),w[u].push(“pageLoad”) }, n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function() { var s=this.readyState; s&&s!==”loaded”&&s!==”complete”||(f(),n.onload=n.onreadystatechange=null) }, i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i) }) (window,document,”script”,”//bat.bing.com/bat.js”,”uetq”);Continue reading

Disable Scripts and Stylesheets (functions.php)

// Check if page is the home page, if yes, then dequeue identified scripts. Improve load time. function check_page_id() { // Get the current page ID global $post; $the_post_type = $post->post_type; $page_id = get_queried_object_id(); // Check if the page ID…Continue reading

Hide Specific Plugins (functions.php)

// Remove plugin from client view to prevent potential issues if settings are changed. function idxc_hide_plugin() { if (is_admin()) { $current_user = wp_get_current_user(); // If the current user’s username is not “idxcentral”, hide the plugin if (‘idxcentral’ !== $current_user->user_login) {…Continue reading

Rank Math

// Change OG title for Rank Math on Vendor Pages function wcv_rankmath_change_og_title( $title ) { WC_Vendors::log( $title ); if ( WCV_Vendors::is_vendor_page() ) { $vendor_shop = urldecode( get_query_var( ‘vendor_shop’ ) ); $vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); $shop_title = get_user_meta( $vendor_id, ‘pv_shop_name’,…Continue reading

Yoast SEO

// Change OG title for Yoast on Vendor Pages function wcv_wpseo_change_og_title( $title ) { if ( WCV_Vendors::is_vendor_page() ) { $vendor_shop = urldecode( get_query_var( ‘vendor_shop’ ) ); $vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); $shop_title = get_user_meta( $vendor_id, ‘pv_shop_name’, true ); $og_title =…Continue reading