Hallo liebe Community,
ich möchte gerne die ähnlichen Produkte aus meinem WooCommerce Shop entfernen.
Leider funktioniert keiner der Codes die ich gefunden habe die man in die functions.php meines Child Themes einfügen soll.
Was mache ich falsch? Muss der Code an einer ganz bestimmten stelle stehen?
einmal:
[FONT=arial][size=8][COLOR=#525252]<?php[/COLOR]
[COLOR=#525252]// wc_remove_related_products[/COLOR]
[COLOR=#525252]// Löschen des Abfrage-Arguments, um keine ähnlichen Produkte anzuzeigen.[/COLOR]
[COLOR=#525252]// Fügen Sie diesen Code in die functions.php Datei Ihres Themes ein.[/COLOR]
[COLOR=#525252]function wc_remove_related_products( $args ) {[/COLOR]
[COLOR=#525252]return array();[/COLOR]
[COLOR=#525252]}[/COLOR]
[COLOR=#525252]add_filter(‘woocommerce_related_products_args’,’wc_remove_related_products’, 10);[/COLOR]
[/SIZE][/FONT][COLOR=#525252][FONT=Arial][FONT=arial][size=8]?>[/SIZE][/FONT]
[/FONT][/COLOR]
und:
[COLOR=#525252][FONT=Arial]remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_related_products’, 20);[/FONT][/COLOR]
Weiterhin möchte ich die Anzahl der Produkte einer Kategorie "die Zahll in den Klammern" entfernen. Auch hier habe ich einen Code für die functions.php gefunden der leider nicht funktioniert?!
[COLOR=#373B41][FONT=Lato][/FONT][/COLOR]
einmal:
[COLOR=#373B41][FONT=Consolas]//anzahl verstecken start[/FONT][/COLOR]
[COLOR=#373B41][FONT=Consolas]add_filter( 'woocommerce_subcategory_count_html', 'woo_remove_category_products_count' );[/FONT][/COLOR]
[COLOR=#373B41][FONT=Consolas] [/FONT][/COLOR]
[COLOR=#373B41][FONT=Consolas]function woo_remove_category_products_count() {[/FONT][/COLOR]
[COLOR=#373B41][FONT=Consolas] return;[/FONT][/COLOR]
[COLOR=#373B41][FONT=Consolas]}[/FONT][/COLOR]
[COLOR=#373B41][FONT=Consolas]//anzahl verstecken ende
[/FONT][/COLOR]
Beste Grüße