• Resolved dan11

    (@dan11)


    I’d like to assign tabs to a custom taxonomy (brands)
    Is that possible? How do I go about doing that?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @dan11,

    The custom product tabs are stored as post metadata rather than as a custom post type. This means that they cannot be assigned taxonomies like a product, post, or page could.

    What’re you trying to achieve with assigning taxonomies?

    Sorry about that – let me know,
    Kevin.

    Thread Starter dan11

    (@dan11)

    Hi Kevin

    I’m using WooCommerce Brands and what I was trying to do is basically assign tabs to Brands, rather than to Product or Category
    e.g. create a tab and assign it to Brand X, then for all products of Brand X, a tab called “About Brand X” will display right under the Additional Information tab

    Let me know,
    Daniel

    HI,

    Second this would be great to make brand-specific tabs for the oo themes product_brand type.

    Thanks

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @dan11 and @fallen-leaf,

    Sorry for the delay – I’ve been traveling.

    We understand the desire for applying tabs to groups of product/taxonomies/brands. We’ve been talking about the idea of a tabs manager that allows you to add/remove these but this is a big feature and we don’t have any current timeline for it (it may end up being a paid add-on as well).

    Sorry about that,
    Kevin.

    Thread Starter dan11

    (@dan11)

    Hi Kevin
    It would be great to have that feature in one of the next releases, I think many users will greatly benefit from it, even a paid addon would be quite worth it
    In the meantime to help with this single taxonomy “product_brand”, do you have a direction or know what files or hooks I’ll need to look at to add the option to create “brand tabs”
    I hope we can figure out how to do that for one fixed taxonomy while the dynamic feature is in the works/plans
    Let me know,
    Daniel

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Daniel,

    Conceptually you’ll need to use WP_Query to fetch all of the products that have the product_brand taxonomy assigned. Once you have all the products, you’ll need to loop through them and create a tab for each one (or assign a saved tab if you’re using a saved tab). One of the problems I have with walking you through this is that I haven’t created tabs in bulk in this way before and I don’t have any code snippets to really help you. I would need to test this locally and work through any issues before I would feel comfortable sending you the code to do it. It’s a bigger task than it may appear and I’m not sure if it’s smart to give you even semi-tested code for this.

    In a week or so I may have a better handle on how to do this, and how to share a snippet with you, but unfortunately I can’t help right now.

    Kevin.

    Thread Starter dan11

    (@dan11)

    Hi Kevin

    That gave me a rough idea on the complexity of this feature

    Indeed a quick snippet would be of great help to give it a start, plenty of people might find it very useful too

    I actually thought to attempt this with ACF but it would be rather more neat to use one plugin for all the tabs instead of splitting them across multiple plugins
    I’ll definitely check back every once in a while for updates

    The plugin is already great as it is and so is the support ??

    Daniel

    • This reply was modified 7 years, 5 months ago by dan11.

    Came here looking for a bulk edit/add option. If it’s too complex, maybe a “global” option would be easier? Adding tabs to ALL products at once?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to assign the tab to a custom taxonomy?’ is closed to new replies.