• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Logo

impressive pages: Webdesign und eCommerce

  • Home
  • Blog
  • Hosting
  • Contact
Start » Blog » Change the number of similar products in WooCommerce

Change the number of similar products in WooCommerce

22. December 2021 Leave a Comment

Change the number of similar products in WooCommerce

WooCommerce displays similar products below the product description. The number can be set with the following code:

add_filter( 'woocommerce_output_related_products_args', 'iphf_change_number_related_products', 10 );
function iphf_change_number_related_products( $args ) {
	$args['posts_per_page'] = 5; // Anzahl der ähnlichen Produkte
	$args['columns'] = 5; // Anzahl der Produkte pro Zeile
	return $args;
}

Filed Under: development, WooCommerce

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Search

Recent Posts

  • WooCommerce: Show free shipping only
  • Remove wrapper DIVs (.wrap) in Genesis
  • Remove the number of products in the category list from the category name
  • Change the number of similar products in WooCommerce
  • Genesis Visual Hook Guide

Categories

  • development
  • Genesis framework
  • Google Search Console
  • mobile
  • SEO
  • Uncategorized
  • Web hosting
  • WooCommerce
  • WordPress

Archives

  • May 2022
  • January 2022
  • December 2021
  • imprint
  • Data protection

Footer

!pages
Heinrich Franz
Wilhelm-Martin-Str. 4
76356 Weingarten (Baden)
instagram
+49 160 85 40 725
info@impressive-pages.de

In my Blog I publish articles about WordPress, Genesis framework und SEO.

© 2022 impressive pages

  • Deutsch