LearnDash Course Search Widget

/** * Author: Sumaiya, Anytype Documentation: https://object.any.coop/bafyreifrops5tp5h7anwsa7k7k4rphi5nvz62sgnxhdidfogjcspk3afli?spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&inviteId=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci#6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * * LearnDash Course Search Widget – Popup Modal Version * * This snippet creates a WordPress shortcode to display a dynamic search widget for LearnDash courses. * Shortcode: [learndash_search_widget] * * Features:…Continue reading

Accessibility Improvement

// 1. Ensure ARIA attributes match proper roles function nexsouk_fix_aria_roles($content) { // Simplistic approach: strip aria-* from elements without proper roles // Better: adjust based on your theme/structure with context $valid_roles = array( ‘button’ => [‘aria-pressed’, ‘aria-expanded’], ‘navigation’ => [‘aria-label’,…Continue reading

VVWC Global Helpers

/** * VVWC Helper Functions */ // Elementor safety post injection (used during cron) function vvwc_inject_dummy_post_context() { if ( defined( ‘DOING_CRON’ ) && DOING_CRON ) { global $post; if ( ! isset( $post ) || ! $post instanceof WP_Post )…Continue reading

Enable quantity field on shop page

// Remove the default add to cart button remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 ); // Add custom add to cart form for both simple and variable products add_action( ‘woocommerce_after_shop_loop_item’, ‘custom_add_to_cart_form_on_shop_page’, 10 ); function custom_add_to_cart_form_on_shop_page() { global $product; if ( $product->is_type( ‘simple’…Continue reading