Home Page › Forums › Porto WordPress Support Articles › How to show or Hide the Add to cart button from certain products and categories
- This topic has 0 replies, 1 voice, and was last updated 1 year, 11 months ago by
Aizaz Awan.
-
AuthorPosts
-
April 5, 2024 at 7:28 am #6105
Hello, @everyone,
The “Add to Cart” button is visible on the individual product page, product archive pages, and category archive pages. Therefore, the solution needs to be implemented on all of these pages. Please follow the steps below.
1. To customize the Single Product Page, follow these steps:
a, Go to your dashboard and navigate to Porto >> Template Builder >> Single Product >> Add new: https://postimg.cc/xJyBMrck
b, Create a new layout without the “Add to Cart” button widget.
c, Apply the layout condition to specify which products and categories should display this layout without the “Add to Cart” button.By implementing this, you can display products on the Single Product Page without the “Add to Cart” button as per your requirements. Refer to this article for guidance on using block/layout conditions: https://www.portotheme.com/wordpress/porto/documentation/display-condition
2. Product/Category Archive Showcase Layout:
To set up a product or category archive, utilize the PORTO Template Builder feature to craft a fresh layout for showcasing products, excluding the “add to cart” button. Access the Template Builder through Dashboard >> Porto >> Template Builder >> Post Type >> Add new. Refer to this image for guidance: https://postimg.cc/TykDw1ch (Note: The post type blocks are only editable with the Gutenberg editor.)
For assistance in creating a custom post type layout, consult this article: https://www.portotheme.com/wordpress/porto/documentation/type-builder-
elements/Once you’ve designed the product showcase layout sans the “add to cart” button, simply apply this layout to the archive pages of both products and categories by following the third step outlined in the process.
3. To configure your product archive layout, follow these steps:
a. Go to Dashboard > Porto > Template Builder > Product Archive > Add New: https://postimg.cc/QHQwGRpY Once the editor opens, you can set up the Type Builder Archive widget/element and select the desired layout to showcase your products.
b. Refer to the screenshot here: https://postimg.cc/w7RJ1pWF for guidance on setting up the layout.
c. Apply this product archive layout to specific products by using the block condition button, as shown here: https://postimg.cc/dDNC41kJ
Follow these steps sequentially to customize and apply your product archive layout effectively.
Regards,
Aizaz from PThemes. -
AuthorPosts
- You must be logged in to reply to this topic.