Więcej niż 3 kategorie w Storefront

Temat nie jest bezpośrednio związany z Linuxem ale...

Szablon Woocommerce dla Wordpressa o nazwie Storefront wyświetla domyślnie tylko 3 kategorie.
Aby to zmienić w pliku functions.php (najlepiej w szablonie child) dodajemy:

Thats not recommended way.. storefront provide filter to modify the code..
Here is solution copy and paste the code in your functions.php
  1. add_filter('storefront_product_categories_args','storefront_product_categories_custom_args');
  2.  
  3. function storefront_product_categories_custom_args( $args ) {
  4. $custom_limit_count = 10; // change this number for needs
  5. $args['limit'] = $custom_limit_count;
  6. return $args;
  7. }

Komentarze

Popularne posty z tego bloga

Jak pobierać foldery na chomikuj w linuxie?