Skip Navigation

[Resolved] Custom taxonomy metabox in a custom post should accept one selected term only

This support ticket is created 6 years, 12 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 9 replies, has 3 voices.

Last updated by nelsonM-2 6 years, 12 months ago.

Assisted by: Minesh.

Author
Posts
#594905

A custom taxonomy metabox displaying in a custom post form (in the admin area), seems to be multiple choice by default.
How can I have a single option taxonomy?

thanks.

#595026

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - there is no such native feature available to restrict custom taxonomy selection to one term.

How ever it's possible by adding custom jQuery. Please check following links that may help you:
=> https://wordpress.stackexchange.com/questions/187595/allow-only-1-taxonomy-per-custom-post-type
=> hidden link
=> https://wordpress.org/plugins/radio-buttons-for-taxonomies/
=> https://wordpress.stackexchange.com/questions/7081/limit-selection-of-custom-taxonomies-to-one

#595174

Hello Minesh,

I see the solutions vary from JS to PHP or a plugin to affect the taxonomy metabox.
I guess I'll try the plugin, for now.

One other question, maybe a feature request, related with this:

wouldn't it be useful to be able to create a taxonomy custom field inside a custom field group?

thanks!

#595486

Minesh
Supporter

Languages: English (English )

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

One other question, maybe a feature request, related with this:
==> I will forward your request for assessment.

wouldn't it be useful to be able to create a taxonomy custom field inside a custom field group?
=> Well, Types already offer Term fields to add custom fields to taxonomy.

More info:
https://toolset.com/documentation/user-guides/term-fields/

#595542

I meant a custom POST field populated with a set of taxonomy terms.

#595544

Minesh
Supporter

Languages: English (English )

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

ahh no - that is not useful.

and we have shortcode to display taxonomy terms attached to post:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy

#595551

Hi Nelson,

Not sure if that's helpful to you, but I have managed to limit custom taxonomy selection to one item at a time by using a CRED form from the front-end. I can share more info if a front-end form is a solution for you.

#595560

Hello Minesh,

thanks for your suggestion, but this issue is all about admin backend and so cred forms do not apply...

I was suggesting that a custom POST field listing taxonomy terms could be useful as we could display it in the same group as the other post custom fields, instead of in a metabox aside.
A question of simplifying the user interface...

But I understand it's not currently possible, so I'm using the plugin you suggested.

#595570

Minesh
Supporter

Languages: English (English )

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

ahh - I got it now. Yes - its not possible currently.

Yes - you can use suggested plugin.

#595577

Great - if you agree that would be a useful custom post field, I appreciate if you could forward that suggestion.
thanks!