function genial_gcs_mega_menu_subcategories_shortcode($atts = array()) { $atts = shortcode_atts(array( 'category_id' => 15, ), $atts, 'display_gcs_mega_menu_subcategories'); $category_id = (int) $atts['category_id']; if (!$category_id) { return ''; } $children = get_terms(array( 'taxonomy' => 'product_cat', 'hide_empty' => false, 'parent' => $category_id, 'orderby' => 'name', 'order' => 'ASC', )); if (is_wp_error($children) || empty($children)) { return ''; } ob_start(); echo ''; return ob_get_clean(); } add_shortcode('display_gcs_mega_menu_subcategories', 'genial_gcs_mega_menu_subcategories_shortcode');remove_action( 'woocommerce_after_main_content', 'flatsome_pages_in_search_results', 10 ); // Add Pages and blog posts to top of search results if set. function relevanssi_pages_in_search_results() { if ( ! is_search() || ! get_theme_mod( 'search_result', 1 ) ) { return; } global $post; if ( get_search_query() ) { $args = array( 'post_type' => 'post', 's' => get_search_query(), 'relevanssi' => true, ); $query = new WP_Query( $args ); $posts = array(); while ( $query->have_posts() ) { $query->the_post(); array_push( $posts, $post->ID ); } $args = array( 'post_type' => 'page', 's' => get_search_query(), 'relevanssi' => true, ); $query = new WP_Query( $args ); $pages = array(); while ( $query->have_posts() ) { $query->the_post(); $wc_page = false; if ( 'page' === $post->post_type ) { foreach ( array( 'shop', 'cart', 'checkout', 'view_order', 'terms' ) as $wc_page_type ) { if ( $post->ID === wc_get_page_id( $wc_page_type ) ) { $wc_page = true; } } } if ( ! $wc_page ) { array_push( $pages, $post->ID ); } } do_action( 'flatsome_products_page_loader' ); if ( ! empty( $posts ) || ! empty( $pages ) ) { $list_type = get_theme_mod( 'search_result_style', 'slider' ); if ( ! empty( $posts ) ) { echo '

' . __( 'Posts found', 'flatsome' ) . '

' . do_shortcode( '[blog_posts columns="3" columns__md="3" columns__sm="2" type="' . $list_type . '" image_height="16-9" ids="' . implode( ',', $posts ) . '"]' ); } if ( ! empty( $pages ) ) { echo '

' . __( 'Pages found', 'flatsome' ) . '

' . do_shortcode( '[ux_pages columns="3" columns__md="3" columns__sm="2" type="' . $list_type . '" image_height="16-9" ids="' . implode( ',', $pages ) . '"]' ); } } } } add_action( 'woocommerce_after_main_content', 'relevanssi_pages_in_search_results', 10 ); /** * Replaces the Flatsome live search default function (get_posts()) with Relevanssi. * * @param string $query The search query, not used. * @param array $args The search query arguments. * @param array $defaults The default values, not used. * * @return array An array of post objects. */ function rlv_flatsome_search_function( $query, $args, $defaults ) { $args['relevanssi'] = true; return get_posts( $args ); } add_filter( 'flatsome_ajax_search_function', function() { return 'rlv_flatsome_search_function'; } ); /* function rlv_flatsome_search_function( $query, $args, $defaults ) { global $flatsome_live_search_query; $flatsome_live_search_query = $args['s']; $args['relevanssi'] = true; return get_posts( $args ); } function rlv_flatsome_search_function( $query, $args, $defaults ) { global $flatsome_live_search_query; $flatsome_live_search_query = $args['s']; $args['relevanssi'] = true; return get_posts( $args ); } */ add_action( 'woocommerce_checkout_create_order', function( $order, $data ) { $custom_fields = array( 'order_comments', ); foreach ( $custom_fields as $field_name ) { if ( isset( $data[ $field_name ] ) ) { $field_value = $data[ $field_name ]; $order->add_order_note($field_value); $order->save(); } } }, 10, 2 );// AFTER TABS add_action('woocommerce_single_product_summary','beratungsbox',50); function beratungsbox(){ echo '
WhatsApp-Chat für Beratung, Verkauf, Neuigkeiten, Live Chat (mit/ohne Video) uwm. – 0163/8185352.
» mehr erfahren
'; } /* AFTER TABS add_action('woocommerce_after_single_product_summary','add_after_tabs',55); function add_after_tabs(){ echo do_shortcode( '[trustedshopsratings]' ); } */ add_filter( 'woocommerce_price_trim_zeros', '__return_true' ); // TRUSTED SHOPS WIDGET function trustedshops_insert(){ return "

Das sagen unsere Kunden/innen über uns

"; } add_shortcode('trustedshopsratings', 'trustedshops_insert'); // Warenkorb Class body hinzufuegen add_filter( 'body_class', 'add_body_class_for_cart_items' ); function add_body_class_for_cart_items( $classes ) { if( ! WC()->cart->is_empty() ) $classes[] = 'cart_has_items'; return $classes; } /* NACH PRODUKT-RASTER */ function after_woocommerce_archive_description() { if ( is_search() || is_shop() ) { echo '
'; echo '

Solltest du nicht das passende Produkt finden, schreib uns einfach eine E-Mail, per WhatsApp oder rufe uns an und wir helfen dir gerne weiter.

'; } //if ( is_product_category() ) { } else { global $wp_query; $cat = $wp_query->get_queried_object(); $queried_object = get_queried_object(); $taxonomy = $queried_object->taxonomy; $term_id = $queried_object->term_id; $langebeschreibung = get_field( 'langbeschreibung', $queried_object ); $langebeschreibung = get_field( 'langbeschreibung', $taxonomy . '_' . $term_id ); /* $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); $image = wp_get_attachment_url( $thumbnail_id ); */ if( get_field('langbeschreibung', $taxonomy . '_' . $term_id) ) { echo '
'; echo '
' . $langebeschreibung . '
'; } } }; add_action( 'flatsome_products_after', 'after_woocommerce_archive_description', 50, 2 ); /* function after_woocommerce_archive_description_category() { if ( is_product_category() ) { global $wp_query; $cat = $wp_query->get_queried_object(); $queried_object = get_queried_object(); $taxonomy = $queried_object->taxonomy; $term_id = $queried_object->term_id; $langebeschreibung = get_field( 'langbeschreibung', $queried_object ); $langebeschreibung = get_field( 'langbeschreibung', $taxonomy . '_' . $term_id ); if( get_field('langbeschreibung', $taxonomy . '_' . $term_id) ) { echo '
'; echo '
' . $langebeschreibung . '
'; } } else { } }; add_action( 'flatsome_products_before', 'after_woocommerce_archive_description_category', 50, 2 ); */ //add_action( 'woodmart_before_shop_page', 'after_woocommerce_archive_description', 10, 2 ); function jumpmarker_after_woocommerce_archive_description() { echo '
'; } add_action( 'flatsome_products_after', 'jumpmarker_after_woocommerce_archive_description', 45, 2 );/* Automatically set the image Title, Alt-Text, Caption & Description upon upload --------------------------------------------------------------------------------------*/ add_action( 'add_attachment', 'my_set_image_meta_upon_image_upload' ); function my_set_image_meta_upon_image_upload( $post_ID ) { // Check if uploaded file is an image, else do nothing if ( wp_attachment_is_image( $post_ID ) ) { $my_image_title = get_post( $post_ID )->post_title; // Sanitize the title: remove hyphens, underscores & extra spaces: $my_image_title = preg_replace( '%\s*[-_\s]+\s*%', ' ', $my_image_title ); // Sanitize the title: capitalize first letter of every word (other letters lower case): $my_image_title = ucwords( strtolower( $my_image_title ) ); // Create an array with the image meta (Title, Caption, Description) to be updated // Note: comment out the Excerpt/Caption or Content/Description lines if not needed $my_image_meta = array( 'ID' => $post_ID, // Specify the image (ID) to be updated 'post_title' => $my_image_title, // Set image Title to sanitized title // 'post_excerpt' => $my_image_title, Set image Caption (Excerpt) to sanitized title // 'post_content' => $my_image_title, // Set image Description (Content) to sanitized title ); // Set the image Alt-Text update_post_meta( $post_ID, '_wp_attachment_image_alt', $my_image_title ); // Set the image meta (e.g. Title, Excerpt, Content) wp_update_post( $my_image_meta ); } }add_action('admin_head', 'my_custom_fonts'); function my_custom_fonts() { echo ''; }function tzn_payment_icons_shortcode() { ob_start(); echo '
'; echo 'PayPal'; echo 'Klarna'; echo 'SEPA'; echo '
'; return ob_get_clean(); } add_shortcode('tzn-payment-icons', 'tzn_payment_icons_shortcode');add_action( 'widgets_init', 'mein_eigener_widget_bereich' ); function mein_eigener_widget_bereich() { register_sidebar( array( 'name' => 'Footer1_1', 'id' => 'footer1-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => 'Footer1_2', 'id' => 'footer1-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => 'Footer1_3', 'id' => 'footer1-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => 'Footer1_4', 'id' => 'footer1-4', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => 'Footer1_5', 'id' => 'footer1-5', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } function genial_display_brands_shortcode() { $terms = get_terms(array( 'taxonomy' => 'pa_hersteller', 'hide_empty' => true, 'orderby' => 'name', 'order' => 'ASC', )); if (is_wp_error($terms) || empty($terms)) { return ''; } $by_letter = array(); foreach ($terms as $term) { $letter = mb_strtoupper(mb_substr($term->name, 0, 1)); if (preg_match('/[0-9]/', $letter)) { $group_key = '0-9'; } else { $group_key = sanitize_title($letter); } if (!isset($by_letter[$group_key])) { $by_letter[$group_key] = array( 'label' => preg_match('/[0-9]/', $letter) ? '0-9' : $letter, 'brands' => array(), ); } $by_letter[$group_key]['brands'][] = $term; } if (empty($by_letter)) { return ''; } ksort($by_letter); ob_start(); echo '
'; foreach ($by_letter as $group_key => $group) { echo '
'; echo '
' . esc_html($group['label']) . '
'; echo '
'; foreach ($group['brands'] as $brand) { $term_link = get_term_link($brand); if (is_wp_error($term_link)) { continue; } echo ''; } echo '
'; echo '
'; } echo '
'; return ob_get_clean(); } add_shortcode('genial_display_brands', 'genial_display_brands_shortcode'); function genial_display_filter_values_shortcode() { $terms = get_terms(array( 'taxonomy' => 'pa_hersteller', 'hide_empty' => true, 'orderby' => 'name', 'order' => 'ASC', )); if (is_wp_error($terms) || empty($terms)) { return ''; } $letters = array(); foreach ($terms as $term) { $letter = mb_strtoupper(mb_substr($term->name, 0, 1)); if (preg_match('/[0-9]/', $letter)) { $group_key = '0-9'; $label = '0-9'; } else { $group_key = sanitize_title($letter); $label = $letter; } if (!isset($letters[$group_key])) { $letters[$group_key] = $label; } } if (empty($letters)) { return ''; } ksort($letters); ob_start(); echo '
'; echo '
ALLE
'; foreach ($letters as $group_key => $label) { echo '
'; echo esc_html($label); echo '
'; } echo '
'; return ob_get_clean(); } add_shortcode('genial_display_filter_values', 'genial_display_filter_values_shortcode'); PUR SCHOEN Kaschmirschal gefilzt, "Nougat" - Genial Concept Store in Krefeld

PURSCHOEN Kaschmirschal „Nougat“

229,00 

Lieferzeit: ca. 2-4 Werktage

Nur noch 1 vorrätig

PURSCHOEN Kaschmirschal "Nougat"
PURSCHOEN Kaschmirschal „Nougat“

Nur noch 1 vorrätig