• Resolved kitka

    (@kitka)


    When I switch this shortcode to show_empty_brands=”false” the whole list just vanishes off the page, and there is just a faint list of the letters of the alphabet. But when I switch it to show_empty_brands=”true” it works.

    Any ideas why?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Frank Remmy (woo-hc)

    (@frankremmy)

    Hi @kitka,

    Thanks for reaching out about the product brand list shortcode issue.

    This behavior is expected, see: https://streamable.com/dn1bgt. It suggests that all your brands might currently be “empty” – meaning they don’t have any products assigned to them yet. When you set show_empty_brands="false", the shortcode hides brands that have no products, which would explain why the entire list disappears and you only see the faint alphabet letters.

    Here are a few things to check:

    1. Go to your products and make sure they’re actually assigned to brands. Even if you’ve created brand terms, products need to be specifically assigned to them.
    2. Ensure your brands are set up correctly in Products → Brands and that products are properly categorized.
    3. Make sure the products assigned to brands are published and visible (not in draft or private status).

    The alphabet letters you’re seeing are likely the A-Z index structure, but without any brands to display, the actual brand links don’t appear.

    For more information, see: https://woocommerce.com/document/woocommerce-brands/#available-shortcodes.

    I hope that helps. Let us know if you need anything else.

    Thread Starter kitka

    (@kitka)

    Thanks for your suggestions. I have checked all those things and everything seems to be in order. So, that didn’t resolve the issue. There are 503 brands and 286 of those have products assigned. Even new products added and assigned a brand do not show up, so it would seem to be a wider issue.

    Plugin Support Frank Remmy (woo-hc)

    (@frankremmy)

    Hi @kitka,

    Thanks for confirming the brand count and product assignments. Since 286 brands do have products and even new ones aren’t appearing, we’re clearly dealing with something more nuanced.

    To help narrow it down, could you share a few more details?

    • Where is the shortcode placed? Is it inside a block editor, a page builder widget, or a custom template? Please share a screenshot using snipboard.io
    • Are you using any brand filters or custom taxonomy queries elsewhere on the page? These might be interfering with the shortcode output.
    • Is the shortcode inside a tab, accordion, or other dynamic element? Sometimes content inside those structures doesn’t render properly until interacted with.
    • Any custom code or functions modifying brand queries or visibility? Even a small tweak in functions.php could affect output.

    That would help us narrow down the issue. Looking forward to your response.

    Thread Starter kitka

    (@kitka)

    I made a plain test page and put in the shortcode in the WordPress block editor, so there is nothing else in the page.

    There are no custom queries on the page. No relevant customisations to the site.

    The only thing I can think of, is that originally the site was using the previous Product Brands plugin, however that has been disabled and deleted. However I don’t know if that plugin perhaps added a new table to the database that is interfering?

    Kitka

    Plugin Support Frank Remmy (woo-hc)

    (@frankremmy)

    Hi Kitka,

    Thank you for confirming the setup details and sharing the history regarding the previous Product Brands plugin. It’s helpful to consider that legacy data or database tables from the older plugin might be conflicting with the current Brands functionality.

    Here are a few steps that could help troubleshoot and potentially resolve the issue:

    • Sometimes old plugins leave behind custom database tables or taxonomy data that could interfere with the new plugin. If you have database access (via phpMyAdmin or similar), you might:
      • Look for any leftover tables related to the old Product Brands plugin and back them up before removing them.
      • Investigate taxonomy terms in the wp_terms, wp_term_taxonomy, and wp_term_relationships tables to ensure that only the Brands taxonomy is present and properly linked.
    • Ensure the WooCommerce Brands plugin is active and correctly registering the product_brand taxonomy. Occasionally, conflicts or remnants of old plugins can cause taxonomies to unregister or malfunction.
    • You could try fetching brands programmatically to see if they return as expected:
      • Using WP CLI: wp term list product_brand
      • Using REST API endpoints for product brands to verify data presence.
    • Although you’ve indicated no customizations, a quick test with all other plugins disabled and a default theme (like Twenty Twenty-Three) can reveal hidden conflicts.
    • Create a completely new product, assign it to a known brand, and check if that brand appears via shortcode on a clean test page.

    I hope that helps. Let us know if you need anything else.

    Thread Starter kitka

    (@kitka)

    I have created a staging site and used the native WordPress Tool to export and import products. Happy to say the shortcode is working properly on the clean version.

    I do have one more question though – which is whether it is possible to switch out the word “Brand” where it appears on the front end of the site for “Artist” ?

    Thread Starter kitka

    (@kitka)

    Oh, a second question also. When re-importing the products, any Brands that had no products were not automatically imported. Is there a way via PHPMyAdmin or another method to simply get a copy of all the original brands (some have category descriptions) and inserting them into the new database?

    Hi @kitka,

    I’m glad the previous issue has been resolved. Well done!

    Regarding renaming, the easiest approach is using a translation tool like Loco Translate. Install and activate the plugin, select WooCommerce, search for terms like “Brand” or “Brands” depending on what you want to change, and replace them with “Artist” and “Artists.”

    For your second question about re-importing brands without products: WooCommerce’s built-in export/import tool only transfers terms that are assigned to products. To migrate all brands, including those without products, you would need to export the wp_terms and wp_termmeta tables (and possibly wp_term_taxonomy) from your old database and import them into the new one using phpMyAdmin or a similar database management tool. Make sure to back up your new site first to avoid overwriting any existing data.

    If you’re not comfortable working directly with the database, it’s safer to consult with an expert from platforms like Codeable.io to help with this task.

    Thread Starter kitka

    (@kitka)

    Well I tried importing those 3 tables to the new database. All the brands came across, but all the connections of brands to products and categories of products disappeared. Not sure what went wrong there…

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for the update. When you import the wp_terms, wp_termmeta, and wp_term_taxonomy tables, you successfully migrated the terms themselves (your brands). However, the information linking those terms to your products and categories is stored in a different table—the wp_term_relationships table.

    • wp_term_relationships is the crucial table that connects an item (like a product) to a taxonomy term (like a brand or a category).
    • By only importing the three tables mentioned, the new database now has the names of the brands, but it has no record of which products belong to which brands, or which brands are linked to product categories.

    If you still face any issues importing data directly through the database. I can recommend WooExperts and Codeable.io as options for getting professional help. Alternatively, you can also ask your development questions in the  WooCommerce Community Slack as custom code falls outside our usual scope of support.

    Plugin Support thelmachido a11n

    (@thelmachido)

    Hi @kitka

    It’s been a while since we heard back from you for this reason we are closing this thread. 

    If WooCommerce has been useful for your store and you appreciate the support you’ve received, we’d truly appreciate it if you could leave us a quick review here: 

     https://wordpress.org/support/plugin/woocommerce/reviews/#new-post

    Feel free to open a new forum topic if you run into any other problem.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘[product_brand_list] shortcode’ is closed to new replies.