Remove Thumbnail Images on the Single Product Page
remove_action(‘woocommerce_product_thumbnails’, ‘woocommerce_show_product_thumbnails’, 20);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
remove_action(‘woocommerce_product_thumbnails’, ‘woocommerce_show_product_thumbnails’, 20);Continue reading
function g9_add_woocommerce_support() { add_theme_support(‘woocommerce’); } add_action(‘after_setup_theme’, ‘g9_add_woocommerce_support’);Continue reading
if (function_exists(‘acf_add_options_page’)) { acf_add_options_page(array( ‘page_title’ => ‘Theme General Settings’, ‘menu_title’ => ‘Theme Settings’, ‘menu_slug’ => ‘theme-general-settings’, ‘capability’ => ‘edit_posts’, ‘redirect’ => false )); }Continue reading
function g9_hide_shipping_when_free_is_available($rates) { $free = array(); foreach ($rates as $rate_id => $rate) { if (‘free_shipping:1’ === $rate->id) { $free[$rate_id] = $rate; break; } } return !empty($free) ? $free : $rates; } add_filter(‘woocommerce_package_rates’, ‘g9_hide_shipping_when_free_is_available’, 100);Continue reading
function g9_remove_schedule_delete() { remove_action(‘wp_scheduled_delete’, ‘wp_scheduled_delete’); } add_action(‘init’, ‘g9_remove_schedule_delete’);Continue reading
function g9_new_product_badge_shop_page() { global $product; $newness_days = 120; $created = strtotime($product->get_date_created()); if ((time() – (60 * 60 * 24 * $newness_days)) < $created) { echo '‘ . esc_html__(‘New!’, ‘woocommerce’) . ‘‘; } } add_action(‘woocommerce_before_shop_loop_item_title’, ‘g9_new_product_badge_shop_page’, 3);Continue reading
function g9_change_number_related_products($args) { $args[‘posts_per_page’] = 3; $args[‘columns’] = 3; return $args; } add_filter(‘woocommerce_output_related_products_args’, ‘g9_change_number_related_products’, 9999);Continue reading
testContinue reading
function mepr_remove_accordion_class( $classes ) { //Course class body $cs_index = array_search( ‘mpcs-course-with-accordion’, $classes ); if ( isset( $cs_index ) ) { unset( $classes[$cs_index] ); } //Sidebar class body $sb_index = array_search( ‘mpcs-sidebar-with-accordion’, $classes ); if ( isset( $sb_index ) )…Continue reading
function g9_nav_menus_load($field) { $menus = wp_get_nav_menus(); if (!empty($menus)) { foreach ($menus as $menu) { $field[‘choices’][$menu->slug] = $menu->name; } } return $field; } add_filter(‘acf/load_field/name=name_of_field’, ‘g9_nav_menus_load’);Continue reading