{"id":54071,"date":"2017-02-08T15:28:22","date_gmt":"2017-02-08T18:28:22","guid":{"rendered":"https:\/\/wiki.samuelchopard.ch\/?p=54071"},"modified":"2019-03-18T14:29:21","modified_gmt":"2019-03-18T13:29:21","slug":"change-number-of-products-per-page-in-woocommerce","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/change-number-of-products-per-page-in-woocommerce\/","title":{"rendered":"Change number of products per page in WooCommerce"},"content":{"rendered":"<p><!--more--><\/p>\n<p>Add the following code to the <a target=\"_blank\" href=\"https:\/\/samuelchopard.ch\/wiki\/2016\/05\/29\/download-blank-child-theme\/\" target=\"_blank\" rel=\"noopener noreferrer\">child-theme<\/a>&#8216;s functions.php:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\">\/\/ Display 24 products per page. Goes in functions.php\nadd_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );<\/pre>\n<p>Replace &#8220;20&#8221; with the number of your choice.<br \/>\nSource: <a target=\"_blank\" href=\"https:\/\/docs.woocommerce.com\/document\/change-number-of-products-displayed-per-page\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/docs.woocommerce.com\/document\/change-number-of-products-displayed-per-page\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Add the following code to the child-theme's functions.php: &nbsp; \/\/ Display 24 products per page. Goes in functions.php add_filter( 'loop_shop_per_page', [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8],"tags":[193,205,234,267,327],"class_list":["post-54071","post","type-post","status-publish","format-standard","hentry","category-plugins","category-woocommerce","tag-number","tag-page","tag-products","tag-shop","tag-woocommerce"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=54071"}],"version-history":[{"count":1,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54071\/revisions"}],"predecessor-version":[{"id":54878,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/54071\/revisions\/54878"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=54071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=54071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=54071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}