I have a very simple question (I hope). I am trying to edit the number of products displayed on my Shop page in my WooCommerce WordPress site, and all attempts thus far have been unsuccessful. I have come across some documentation stating that you can put dd_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 ); in the functions.php file but I am unable to find the PHP file.

I have searched all through the root WP folder, /wp-content/plugins/woocommerce folder, /wp-content/plugins/woocommerce/includes folder and /wp-content/plugins/woocommerce/templates/ folder through an FTP client and haven’t found anything.

Where is it?

2 Answers
2

Woocommerce is a plugin. The functions.php file is a Theme component, which is auto-loaded by WordPress Core when the theme boots.

While Woocommerce, or any other plugin, may have a file named functions.php but such is not required and it is not the functions.php typically referenced here and elsewhere when people suggest adding code that file, and a file of that name used by a plugin won’t be auto-loaded by Core but would have to be loaded by plugin code.

There are Woocommerce themes, which probably have a functions.php, though functions.php is not a required theme file.

Leave a Reply

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