Support » Plugin: Reusable Product Description for WooCommerce » Add tab to a custom taxonomy

  • Resolved dan11

    (@dan11)


    Hi Mike

    Very useful plugin!

    I was wondering, as I’m using a brands plugin, how do I go about adding a new tab to a brand?
    The brand taxonomy is called yith_product_brand

    This is the URL of the edit brand edit page:
    /wp-admin/term.php?taxonomy=yith_product_brand&tag_ID=301&post_type=product

    Let me know!
    Daniel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author mjke87

    (@mjke87)

    Hi Dan,

    If the brand taxonomy is a regular WooCommerce attribute taxonomy, then it should definitely work and you’d proceed just the same.

    1. Simply visit the edit page that you posted and you should see something like this: https://ps.w.org/woo-product-attribute-tab/assets/screenshot-3.png
    2. Now configure the four options: display type, description source, alternative tab title and priority.
    3. Then add or edit the descriptions of your brand terms.
    4. Now, whenever a brand with a description is assigned to a product,
      the tab will be displayed on the single product page.

    Most of this is explained more detailed in the FAQ:
    https://wordpress.org/plugins/woo-product-attribute-tab#faq

    Let me know if you need further help.

    Cheers,
    Mike

    Hi Mike

    Thanks a lot for the guidance, I just followed through and was able to achieve that result!

    I was just wondering how do I handle if I’d like to assign the tabs rather to the yith_proudct_brand taxonomy? (custom taxonomy created by the brands plugin)
    Here’s a picture of what the brand edit screen looks like:

    I’m basically trying to display the brand’s Description in the tabs

    • This reply was modified 2 years, 11 months ago by dan11.
    Plugin Author mjke87

    (@mjke87)

    Hi Dan,

    This is currently not possible for custom taxonomies and I don’t know how exactly how the brand plugin handles this custom taxonomy. But I am pretty certain that what you are looking for can be achieved with a couple of filter hooks provided in my plugin; I quickly looked into it.

    You’d have to hook in somewhere in the components/class.tabs.php class of the Product Attribute Tab for WooCommerce plugin. In case the brand taxonomy can be used like a regular product attribute taxonomy, you might only have to “fake” the display type using a filter.

    Otherwise, using the root woocommerce_product_tabs hook provided by WooCommerce will work for guaranteed. There you could simply add your brand descriptions in a new tab manually. But you wouldn’t even need the Product Attribute Tab for WooCommerce plugin for that.

    Cheers, Mike

    Hi Mike

    Well noted, sounds perfect! I’ll definitely go ahead and try out both methods and see how I’m doing and which fits better for my needs

    Thanks for a great plugin with great support!

    Daniel

    • This reply was modified 2 years, 11 months ago by dan11.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add tab to a custom taxonomy’ is closed to new replies.