Remove the Breadcrumbs (WooCommerce)
function g9_woocommerce_breadcrumb() { remove_action(‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20, 0); } add_action(‘init’, ‘g9_woocommerce_breadcrumb’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function g9_woocommerce_breadcrumb() { remove_action(‘woocommerce_before_main_content’, ‘woocommerce_breadcrumb’, 20, 0); } add_action(‘init’, ‘g9_woocommerce_breadcrumb’);Continue reading
function g9_limit_order_note_length($fields) { $fields[‘order’][‘order_comments’][‘maxlength’] = 200; return $fields; } add_filter(‘woocommerce_checkout_fields’, ‘g9_limit_order_note_length’);Continue reading
function g9_custom_login_css() { ?>Continue reading
function g9_custom_excerpt_length($length) { return 20; } add_filter(‘excerpt_length’, ‘g9_custom_excerpt_length’);Continue reading
add_filter( ‘use_widgets_block_editor’, ‘__return_false’ );Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 10); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 10);Continue reading
function wpsnippets_allow_svg_files($mime_types) { // Return original value if user doesn’t have a required capability if (!current_user_can(‘manage_options’)) { return $mime_types; } $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘svgz’] = ‘image/svg+xml’; return $mime_types; } add_filter(‘upload_mimes’, ‘wpsnippets_allow_svg_files’);Continue reading
function g9_disable_emojis() { remove_action(‘wp_head’, ‘print_emoji_detection_script’, 7); remove_action(‘admin_print_scripts’, ‘print_emoji_detection_script’); remove_action(‘wp_print_styles’, ‘print_emoji_styles’); remove_action(‘admin_print_styles’, ‘print_emoji_styles’); remove_filter(‘the_content_feed’, ‘wp_staticize_emoji’); remove_filter(‘comment_text_rss’, ‘wp_staticize_emoji’); remove_filter(‘wp_mail’, ‘wp_staticize_emoji_for_email’); add_filter(‘tiny_mce_plugins’, ‘g9_disable_emojis_tinymce’); add_filter(‘wp_resource_hints’, ‘g9_disable_emoji_dns_prefetch’, 10, 2); } function g9_disable_emojis_tinymce($plugins) { if (is_array($plugins)) { return array_diff($plugins, array(‘wpemoji’)); } else { return array(); }…Continue reading
/** * Add the gateway to WC Available Gateways * * @since 1.0.0 * @param array $gateways all available WC gateways * @return array $gateways all WC gateways + Woo MPGS gateway */ function woo_mpgs_add_to_gateways( $gateways ) { $gateways[] =…Continue reading
if (!function_exists(‘woocommerce_template_single_excerpt’)) { function woocommerce_template_single_excerpt($post) { global $post; if ($post->post_excerpt) echo ‘ ‘ . do_shortcode(wpautop(wptexturize($post->post_excerpt))) . ‘ ‘; } }Continue reading