How to limit the number of taxonomy values in a Wordpress post?

Francesco Gallarotti picture Francesco Gallarotti · Feb 9, 2011 · Viewed 7k times · Source

I have defined a series of custom post types (namely "PortfolioPage" and "PortfolioGallery").

Each of them uses a custom taxonomy called "Artist".

Is there any way to limit the end-user to enter AT MOST ONE artist per PortfolioPage / PortfolioGallery post?

Answer

deadlyhifi picture deadlyhifi · Feb 10, 2011

You could cause the custom taxonomy to use radio buttons rather than checkboxes, have a look here: https://wordpress.stackexchange.com/questions/7456/altering-the-appearance-of-custom-taxonomy-inputs