The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join

WooCommerce

Add a Custom Message on the WooCommerce Shop Page

Display a custom promotional message above the product listing on your WooCommerce Shop page. Steps Add the code below to your theme’s functions.php. Change the message to your preferred text. Save and refresh the Shop page.


Change WooCommerce Shop Page Products Per Page

Control how many products WooCommerce displays on each Shop or product archive page. Steps Add the code below to your theme’s functions.php. Change 12 to your preferred number. Save and refresh the Shop page.


Change WooCommerce “Free!” Price Text

Replace WooCommerce’s default “Free!” text with your own custom text, such as “Complimentary” or “No Charge”. Steps Add the code below to your theme’s functions.php. Change the text to whatever you want. Save and check products with a price of 0.


Disable WooCommerce Related Products

If you don’t want WooCommerce to display the Related Products section on product pages, you can remove it completely with a simple hook. Steps Add the code below to your theme’s functions.php. Save the file. Refresh any single product page.


Change WooCommerce Related Products Count

Control how many related products WooCommerce displays on the single product page. Steps Add the code below to your theme’s functions.php. Change 4 to your preferred number. Save and refresh a product page.


Add a “New” Badge to WooCommerce Products

Display a “New” badge automatically on products published within the last 30 days. Steps Add the code below to your theme’s functions.php. Change 30 to the number of days you want. Add CSS to style the badge if required. Optional CSS .custom-new-badge { position: absolute; top: 10px; left: 10px; z-index: 5; background: #000; color: #fff; […]


Change WooCommerce Products Per Row

If you want to control how many products appear in each row on the WooCommerce shop/category pages, you can use the loop_shop_columns filter. Steps Add the code below to your theme’s functions.php. Change 4 to the number of products you want per row. Save and refresh your Shop page.



Remove WooCommerce Product Quantity from the Cart

If you want customers to purchase only one quantity of each product, you can remove the quantity field from the WooCommerce Cart page. Steps Open your theme’s functions.php file. Add the code below. Save the file. Refresh your Cart page. Done — the quantity input will be hidden from the cart.


Add a Custom GST Number Field in WooCommerce Checkout

Let customers enter their GST number at checkout, with built-in format validation, so you can issue GST-compliant invoices for business customers — commonly needed for stores selling in India. Steps Open your theme’s functions.php file. Add the code below. Save the file. Open the WooCommerce Checkout page. Done — a new GST Number field will […]


Proudly supported by