3. Adding quick view buttons
WooCommerce Quick View Pro provides several ways to control where the quick view buttons appear:
- Enable them globally for all products
- Disable them for specific categories
- Add them manually using a shortcode
Enable quick view globally for all products
You can enable quick view buttons throughout your store by enabling the relevant options on the plugin settings page. This will add them next to the add to cart button everywhere that WooCommerce lists products including the main shop page, product category pages, WooCommerce Gutenberg blocks, the built-in WooCommerce shortcodes, etc.
If you are listing products using a page builder plugin, such as Divi or Elementor, then the quick view buttons may not appear. This is because WooCommerce Quick View Pro is designed to add quick view buttons to the products displayed by WooCommerce itself, and not necessarily third party plugins. If you'd like quick view buttons to appear in the blocks created by another plugin, please send us a feature request and we will consider it depending the amount of demand.
Disable quick view for specific categories
If you have enabled quick view in your store then you can disable it for specific categories or sub-categories. There are 3 options for this on the Add/Edit Category screen in WooCommerce, depending on whether you are editing a category or a sub-category:
- Use global setting for this category and child categories - this is the default for top level categories and uses the settings from the WooCommerce Quick View Pro plugin settings page.
- Inherit from parent category - this is the default for child categories and means that they will use the same settings as the parent category.
- Disable for this category and child categories - disables quick view for the products in this category and all its sub-categories.
These options give you full control over which categories to display the quick view lightbox. If you want to disable quick view for a parent category while enabling it for its sub-categories then you can do this by disabling it for the parent category, and selecting the global setting for the child categories.
If a product is in multiple categories then the settings from the category with the lowest name alphabetically will be used.
Add quick view buttons using a shortcode
WooCommerce Quick View Pro comes with a shortcode which you can use to insert quick view buttons anywhere on your site. Each shortcode will add a quick view button for one product, and you can use it as many times as you like.
Further reading: Check out our tutorial about 3 ways to add quick view buttons using a shortcode.
Add the following shortcode to any page, post, widget or other text area on your site:
Replace "123" in the shortcode with the ID of the product that you are creating a quick view button for. To find the product ID, go to the Products page in the WordPress admin and hover over the product. The ID will appear in the left hand column so that you can copy it into the shortcode.
Changing the button text
By default, the quick view button will contain the text that you set on the plugin settings page. You can change this for each individual button by adding the
text option to the shortcode:
[quick_view id="123" text="Buy T-Shirt"]