如何限制 WordPress 帖子中分类值的数量?
我定义了一系列自定义帖子类型(即“PortfolioPage”和“PortfolioGallery”)。
他们每个人都使用称为“艺术家”的自定义分类法。
有没有办法限制最终用户在每个 PortfolioPage / PortfolioGallery 帖子中最多输入一位艺术家?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使自定义分类使用单选按钮而不是复选框,请查看此处:https://wordpress.stackexchange.com/questions/7456/altering-the-appearance-of-custom-taxonomy-inputs
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