display the terms of a product attribute in a specific page
-
Hello,
Can I display all the terms of a woocommerce product attribute in a specific page (even empty terms) and in front of each term the number of products linked with it?Example :
Attribute A
Term 1 (2)
Term 2 (1)
Term 3 (0)
Term 4 (2)
Term 5 (1)
Term 6 (0)Regards
-
Hello @tnwebdev,
Can I display all the terms of a woocommerce product attribute in a specific page (even empty terms) and in front of each term the number of products linked with it?
If I understand you correctly, you want to show all terms of certain attributes on a page or widget.
You can use the Product Attribute filter block. I should note the block will not render on custom pages unless you have the Products (Beta) block on the same page.
If you add it as a widget, it will work only on archive pages likeshop
,category
, etc.
Link to image: https://d.pr/i/mPHbuaYou can download the WooCommerce Blocks plugin from here.
Hope this helps!Hello, thank you for your feedback.
Yes especially on a custom page I want to display the terms of certain attributes.
I have already used product filter by attribute in a custom page and it only works there are 2 things with it:
a- Empty terms are not displayed.
b- there is not in front of each term the number of linked product.Block used ‘Product filter by attibute’ https://postimg.cc/9Rr76DD7
Result: https://postimg.cc/wy3z8bSw
As for the plugin, when I downloaded it, I couldn’t find any more blocks than what I already have.Existing WooCommerce blocks: https://postimg.cc/XrwPvZtM
Regards.
Following :
I used the display of attributes in the “Products filter” block and it is the same as the “Product filter by attribute” block, the empty terms are not displayed and there is no in front of each term the number of linked product, except for the display of categories.
Besides, when I display the categories from the “Products filter” block, the default “unclassified” category is displayed with the rest of the categories when I want to exclude it, any idea how to make it disappear?
RegardsHello @tnwebdev,
I’m not fimilar with the editor you’re using, I highly recommend sticking with Gutenberg if you plan to use WooCommerce Blocks.a- Empty terms are not displayed.
This is normal.
b- there is not in front of each term the number of linked product.
Perhaps you have this options disabled.
Link to image: https://d.pr/i/P4rSWsBesides, when I display the categories from the “Products filter” block, the default “unclassified” category is displayed with the rest of the categories when I want to exclude it, any idea how to make it disappear?
There is no Product filter block in WooCommerce, do you mean the product category list?
Link to image: https://d.pr/i/HGGaqpAlthough it sounds very logical, for the time being, there is no option to hide the default category. I will recommend posting this as a feature request: https://woocommerce.com/feature-requests/woocommerce-gutenberg-products-block/#
If you share with us your site URL we can share a CSS snippet to hide it. ??</img>
Cheers!Hello, thank you for your feedback.
It’s the editor of my Porto theme, and besides, when I switch to Gutenberg, even the categories no longer display the empty categories, nor their children, whereas basically that’s what I’m looking for with the number of linked product in front of each category and attribute term.
b- When I use the Products by attribute block of the Gutenberg editor, the terms in question do not even appear.
Thanks, I have already hidden the category in question with the css.
My greetings.
Hello @tnwebdev,
b- When I use the Products by attribute block of the Gutenberg editor, the terms in question do not even appear.
As mentioned above, this is the limitation of the block. The attributes will only render if the block is added as a widget on archive pages like Shop & Category pages.
If you want the block to work on a custom page, you need to add the Products (Beta) block as well to the same page.
Cheers!Hello,
I can’t find the product block (beta)
My greetings
Hi @tnwebdev
You can find the Product Beta block in your WordPress Editor. Take a look at this screenshot: https://screencast-o-matic.com/i/c0VIDoVw4MFAlso make sure you’re using the latest version of the WooCommerce (7.3.0)
Hello, thank you for your feedback.
I can’t find the block you mention: https://postimg.cc/PNVqyRHN
My greetings
Hello @tnwebdev,
Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.
Look forward to hearing back from you.Hello, thank you for your response and collaboration. Below, a copy of what you have asked me for: “system status.” “Happy reading
### WordPress Environment ### WordPress address (URL): https://xx-xxxxxx.fr Site address (URL): https://xx-xxxxxx.fr WC Version: 7.3.0 REST API Version: ?</img> 7.3.0 WC Blocks Version: ?</img> 9.1.5 Action Scheduler Version: ?</img> 3.4.0 Log Directory Writable: ?</img> WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 512 Mo WP Debug Mode: – WP Cron: ?</img> Language: fr_FR External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.29 PHP Post Max Size: 130 Mo PHP Time Limit: 165 PHP Max Input Vars: 16000 cURL Version: 7.64.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 5.7.40-log Max Upload Size: 128 Mo Default Timezone is UTC: ?</img> fsockopen/cURL: ?</img> SoapClient: ?</img> DOMDocument: ?</img> GZip: ?</img> Multibyte String: ?</img> Remote Post: ?</img> Remote Get: ?</img> ### Database ### WC Database Version: 7.3.0 WC Database Prefix: wp_ Taille totale de la base de données: 21.87MB Taille de la base de données: 19.09MB Taille de l’index: 2.78MB wp_woocommerce_sessions: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_api_keys: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_attribute_taxonomies: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_downloadable_product_permissions: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB wp_woocommerce_order_items: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_order_itemmeta: Données?: 0.08MB + Index?: 0.06MB + Moteur InnoDB wp_woocommerce_tax_rates: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB wp_woocommerce_tax_rate_locations: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_shipping_zones: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_woocommerce_shipping_zone_locations: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_shipping_zone_methods: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_woocommerce_payment_tokens: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woocommerce_payment_tokenmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_woocommerce_log: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_actionscheduler_actions: Données?: 0.16MB + Index?: 0.14MB + Moteur InnoDB wp_actionscheduler_claims: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_actionscheduler_groups: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_actionscheduler_logs: Données?: 0.13MB + Index?: 0.11MB + Moteur InnoDB wp_categorymeta: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_commentmeta: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_comments: Données?: 0.05MB + Index?: 0.09MB + Moteur InnoDB wp_links: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_member_catmeta: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_options: Données?: 2.52MB + Index?: 0.14MB + Moteur InnoDB wp_portfolio_catmeta: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_postmeta: Données?: 3.52MB + Index?: 0.80MB + Moteur InnoDB wp_posts: Données?: 11.52MB + Index?: 0.28MB + Moteur InnoDB wp_product_catmeta: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_termmeta: Données?: 0.08MB + Index?: 0.06MB + Moteur InnoDB wp_terms: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_term_relationships: Données?: 0.05MB + Index?: 0.02MB + Moteur InnoDB wp_term_taxonomy: Données?: 0.05MB + Index?: 0.03MB + Moteur InnoDB wp_usermeta: Données?: 0.05MB + Index?: 0.03MB + Moteur InnoDB wp_users: Données?: 0.02MB + Index?: 0.05MB + Moteur InnoDB wp_wc_admin_notes: Données?: 0.06MB + Index?: 0.00MB + Moteur InnoDB wp_wc_admin_note_actions: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_category_lookup: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_wc_customer_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_download_log: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_order_coupon_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_order_product_lookup: Données?: 0.02MB + Index?: 0.06MB + Moteur InnoDB wp_wc_order_stats: Données?: 0.02MB + Index?: 0.05MB + Moteur InnoDB wp_wc_order_tax_lookup: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB wp_wc_product_attributes_lookup: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_product_download_directories: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_product_meta_lookup: Données?: 0.02MB + Index?: 0.09MB + Moteur InnoDB wp_wc_rate_limits: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_reserved_stock: Données?: 0.02MB + Index?: 0.00MB + Moteur InnoDB wp_wc_tax_rate_classes: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_wc_webhooks: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_woof_query_cache: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_yith_wcwl: Données?: 0.02MB + Index?: 0.02MB + Moteur InnoDB wp_yith_wcwl_lists: Données?: 0.02MB + Index?: 0.03MB + Moteur InnoDB ### Post Type Counts ### attachment: 166 custom_css: 1 customize_changeset: 5 faq: 10 nav_menu_item: 354 page: 26 porto_builder: 24 post: 1 product: 23 product_variation: 29 revision: 532 shop_order: 35 wp_global_styles: 1 wpcf7_contact_form: 5 yaymail_template: 11 ### Security ### Secure connection (HTTPS): ?</img> Hide errors from visitors: ?</img> ### Active Plugins (13) ### Classic Widgets: par Contributeurs et contributrices WordPress – 0.3 Under Construction / Maintenance Mode From Acurax: par Acurax – 2.6 Contact Form 7: par Takayuki Miyoshi – 5.7.2 Jetpack: par Automattic – 11.7.1 éditeur de page: par Michael M - WPBakery.com – 6.10.0 Loco Translate: par Tim Whitlock – 2.6.3 Porto Theme - Functionality: par P-Themes – 2.7.0 WooCommerce Monetico Gateway: par Nicolas Maillard – 2.4.4 HUSKY - Products Filter Professional for WooCommerce: par realmag777 – 1.3.2 WooCommerce Shipping & Tax: par WooCommerce – 2.1.1 WooCommerce: par Automattic – 7.3.0 YayMail - WooCommerce Email Customizer: par YayCommerce – 3.1.7 YITH WooCommerce Wishlist: par YITH – 3.17.0 ### Inactive Plugins (1) ### Akismet Anti-Spam: par Automattic – 5.0.2 ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ?</img> Order datastore: WC_Order_Data_Store_CPT ### WC Pages ### Base de la boutique: #207 - /boutique/ Panier: #208 - /panier/ Commander: #209 - /checkout/ Mon compte: #210 - /my-account/ Conditions générales de vente et d’utilisation: #6701 - /conditions-generales/ ### Theme ### Name: Porto Version: 6.7.1 Author URL: https://www.portotheme.com/ Child Theme: ?</img> – Si vous modifiez WooCommerce sur un thème parent que vous n’avez pas construit personnellement nous vous recommandons d’utiliser un thème enfant. Voir?: Comment créer un thème enfant WooCommerce Support: ?</img> ### Templates ### Overrides: lg/woocommerce/archive-product.php lg/woocommerce/cart/cart-empty.php lg/woocommerce/cart/cart-shipping.php version 3.6.0 est obsolète. La version du noyau est 7.3.0 lg/woocommerce/cart/cart-totals.php lg/woocommerce/cart/cart.php lg/woocommerce/cart/cross-sells.php lg/woocommerce/cart/mini-cart.php lg/woocommerce/cart/proceed-to-checkout-button.php lg/woocommerce/cart/shipping-calculator.php lg/woocommerce/checkout/form-billing.php lg/woocommerce/checkout/form-checkout.php lg/woocommerce/checkout/form-coupon.php lg/woocommerce/checkout/form-login.php lg/woocommerce/checkout/form-pay.php lg/woocommerce/checkout/form-shipping.php lg/woocommerce/checkout/payment-method.php lg/woocommerce/checkout/payment.php lg/woocommerce/checkout/review-order.php lg/woocommerce/checkout/thankyou.php lg/woocommerce/content-product-cat.php lg/woocommerce/content-product.php lg/woocommerce/content-single-product.php lg/woocommerce/content-widget-product.php lg/woocommerce/global/form-login.php lg/woocommerce/global/quantity-input.php lg/woocommerce/global/wrapper-start.php lg/woocommerce/loop/add-to-cart.php lg/woocommerce/loop/loop-end.php lg/woocommerce/loop/loop-start.php lg/woocommerce/loop/no-products-found.php lg/woocommerce/loop/orderby.php lg/woocommerce/loop/pagination.php lg/woocommerce/loop/rating.php lg/woocommerce/loop/sale-flash.php lg/woocommerce/myaccount/dashboard.php lg/woocommerce/myaccount/downloads.php lg/woocommerce/myaccount/form-add-payment-method.php lg/woocommerce/myaccount/form-edit-account.php lg/woocommerce/myaccount/form-edit-address.php lg/woocommerce/myaccount/form-login.php lg/woocommerce/myaccount/form-lost-password.php lg/woocommerce/myaccount/form-reset-password.php lg/woocommerce/myaccount/lost-password-confirmation.php lg/woocommerce/myaccount/my-account.php lg/woocommerce/myaccount/my-address.php lg/woocommerce/myaccount/my-downloads.php lg/woocommerce/myaccount/my-orders.php lg/woocommerce/myaccount/navigation.php lg/woocommerce/myaccount/orders.php lg/woocommerce/myaccount/payment-methods.php lg/woocommerce/myaccount/view-order.php lg/woocommerce/order/form-tracking.php lg/woocommerce/order/order-details-customer.php lg/woocommerce/order/order-details.php lg/woocommerce/order/order-downloads.php lg/woocommerce/order/tracking.php lg/woocommerce/single-product/add-to-cart/simple.php lg/woocommerce/single-product/add-to-cart/variable.php lg/woocommerce/single-product/meta.php lg/woocommerce/single-product/product-attributes.php lg/woocommerce/single-product/product-image.php lg/woocommerce/single-product/product-thumbnails.php lg/woocommerce/single-product/rating.php lg/woocommerce/single-product/related.php lg/woocommerce/single-product/review-meta.php lg/woocommerce/single-product/review-rating.php lg/woocommerce/single-product/review.php lg/woocommerce/single-product/sale-flash.php lg/woocommerce/single-product/short-description.php lg/woocommerce/single-product/tabs/tabs.php lg/woocommerce/single-product/title.php lg/woocommerce/single-product/up-sells.php lg/woocommerce/single-product-reviews.php Outdated Templates: ?</img> Apprenez comment mettre à jour ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings Daily Cron: ?</img> Next scheduled: 2023-01-17 22:40:49 +01:00 Options: ?</img> Notes: 55 Onboarding: completed ### Action Scheduler ### Terminé: 405 Oldest: 2022-12-18 01:08:58 +0100 Newest: 2023-01-17 16:43:25 +0100 En attente: 2 Oldest: 2023-01-17 16:51:47 +0100 Newest: 2023-01-17 16:51:47 +0100 ### Status report information ### Generated at: 2023-01-17 16:51:41 +01:00
Hello, thank you for your response.
I inserted the Products (beta) block after installing the Gutenberg plugin, but I can’t find the option to display attributes
(see image: https://postimg.cc/RqjjsgH9).Warm regards,
Hello @tnwebdev
Kindly note that the block selected in the screenshot linked is that of Product Image.
You need to select the?Products (Beta) Block, instead, for the attributes options to appear.
The red arrow, in the screenshot linked here, showcases a way to visualize all the blocks currently added to that page, for easier selection.
I trust that points you in the right direction, but if you have more questions, let us know. We’re happy to help.
- This reply was modified 1 year, 10 months ago by anastas10s. Reason: added further instructions/clarification
Hello, thank you for your response.
By the way, this is the only and unique “Produits (bêta)” block I have in the list: https://postimg.cc/Wh6tYS6C
Kind regards
- The topic ‘display the terms of a product attribute in a specific page’ is closed to new replies.