Site Wide Header

add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading

Site Wide Header

add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading

frontend/js/snippets/scroll-behavior/sticky

… document.addEventListener(“DOMContentLoaded”, () => { // Customize this to match your sticky header (or set to null if not needed) const HEADER_SELECTOR = “#site-header”; const getHeaderOffset = () => { const header = HEADER_SELECTOR && document.querySelector(HEADER_SELECTOR); return header ? header.getBoundingClientRect().height…Continue reading

Remove “Coupon Field” on the Cart Page Amiru アミル さん

/** * Remove the “Have a coupon?” text and field from the cart page. Amiru アミル さん */ function woo_remove_coupon_form_on_cart() { remove_action( ‘woocommerce_before_cart_table’, ‘woocommerce_output_all_notices’, 10 ); remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_cart_totals’, 10 ); } add_action( ‘woocommerce_cart_is_empty’, ‘woo_remove_coupon_form_on_cart’ ); remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_form_coupon’, 10…Continue reading

Change the “Add to Cart” Button Text

/** * Change the “Add to Cart” button text globally. * Change ‘Buy Now’ to your desired text. */ function custom_woocommerce_product_add_to_cart_text( $text, $product ) { switch ( $product->get_type() ) { case ‘external’: return ‘View Product’; // Or ‘Buy from Vendor’…Continue reading

Show Product Categories in the Vendor Product Catalog

add_action( ‘woocommerce_shop_loop_item_title’, ‘add_category_above_product_title’, 6 ); function add_category_above_product_title() { global $product; $current_post_id = isset( $GLOBALS[‘wp_query’]->queried_object_id ) ? $GLOBALS[‘wp_query’]->queried_object_id : 0; if ( ! $current_post_id ) { return; } $post_content = get_post_field( ‘post_content’, $current_post_id ); if ( strpos( $post_content, ‘[wcv_products’ ) ===…Continue reading

LIFTER – Course to Module

/** * LifterLMS Text Replacement Snippet – VERIFIED VERSION * Changes “Courses” to “Modules” and “Lessons” to “Steps” * Add to WP Code Snippets or functions.php * Run everywhere (Frontend & Admin) * * Based on official LifterLMS documentation and…Continue reading

LIFTER – Course to Module

/** * LifterLMS Text Replacement Snippet – VERIFIED VERSION * Changes “Courses” to “Modules” and “Lessons” to “Steps” * Add to WP Code Snippets or functions.php * Run everywhere (Frontend & Admin) * * Based on official LifterLMS documentation and…Continue reading