Skip Navigation

[Resolved] Taxonomy to be displayed in view as dropdown

This thread is resolved. Here is a description of the problem and solution.

Problem:
Taxonomy to be displayed in view as dropdown

Solution:
There is not such feature to display the selected terms as a dropdown select.

But a possible workaround I can think of is you should try to create a taxonomy view and filter your view for your selected terms by adding a query filter from the "Query filter" section of your taxonomy view and within the "Loop Editor" section you should try to add your required form or set onchange method for your selectbox outside the view's loop and inside the view's view you should add the options.

You can find the proposed solution in this case with the following reply:
https://toolset.com/forums/topic/taxonomy-to-be-displayed-in-view-as-dropdown/#post-1755049

Relevant Documentation:

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by gavinP 3 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1753715
Taxonomy current display.png

Hi guys, I currently have a taxonomy setup and bound to products, namely:

T-Shirt Colour

When adding these to the product single view, the only options are to separate via comma (or similar) and it always wraps each entry in an <a> tag. I need this information to feed a hidden form and was wondering what would be the best way to get the selected taxonomies to diplay in a dropdown select field?

So for example if the product has:

Black
Gold
Light Blue
Light Grey

Selected via the taxonomy, at the moment they print to screen comma separated and linked to archive (see attached). I would like these to instead display in a select dropdown without an <a> link.

Is this possible? And thanks so much....

#1755049

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is not such feature to display the selected terms as a dropdown select.

But a possible workaround I can think of is you should try to create a taxonomy view and filter your view for your selected terms by adding a query filter from the "Query filter" section of your taxonomy view and within the "Loop Editor" section you should try to add your required form or set onchange method for your selectbox outside the view's loop and inside the view's view you should add the options.

For example - your taxonomy view Loop Editor should look like something as follows:

[wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
        <select name="tax-tshirt-colors" id="tax-tshirt-colors" onChange="window.location.href=this.value">
        <wpv-loop>
          <option value="[wpv-taxonomy-link]">[wpv-taxonomy-title]</option>
        </wpv-loop>
        </select>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]
#1761247

My issue is resolved now. Thank you!

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.