Silke Naun-Bates
Zeigt alle 3 Ergebnisse
function remove_image_zoom_support() { remove_theme_support( 'wc-product-gallery-zoom' ); } add_action( 'wp', 'remove_image_zoom_support', 100 ); // register add to cart action //function dac_add_cart_button () { // add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 10 ); //} //add_action( 'after_setup_theme', 'dac_add_cart_button' ); //add_filter( 'woocommerce_add_to_cart_fragments', 'your_custom_functions', 10, 1 ); /** * Override theme default specification for product # per row */ function loop_columns() { return 5; // 5 products per row } add_filter('loop_shop_columns', 'loop_columns', 999); /* * WooCommerce - Ähnliche Produkte ausblenden * https://wooexperte.de/snippet/woocommerce-aehnliche-produkte-ausblenden/ */ // remove_action ( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20); /** * Change text strings * * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext */ function custom_related_products_text( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'Ähnliche Produkte' : $translated_text = __( 'Unsere Empfehlungen', 'woocommerce' ); break; } return $translated_text; } add_filter( 'gettext', 'custom_related_products_text', 20, 3 ); function ds_translate_text($translated) { $translated = str_ireplace('read more', 'Weiterlesen', $translated); $translated = str_ireplace('by', 'von', $translated); return $translated; } add_filter('gettext', 'ds_translate_text'); add_filter('ngettext', 'ds_translate_text'); // Feld hinzufügen add_action('woocommerce_product_options_general_product_data', function () { woocommerce_wp_text_input([ 'id' => 'isbn', 'label' => __('ISBN', 'woocommerce'), 'desc_tip' => true, 'description' => __('Gib die ISBN des Produkts ein.'), ]); }); // Feld speichern add_action('woocommerce_process_product_meta', function ($post_id) { if (isset($_POST['isbn'])) { update_post_meta($post_id, 'isbn', sanitize_text_field($_POST['isbn'])); } });
Zeigt alle 3 Ergebnisse