如何限制 WordPress 帖子中分类值的数量?

发布于 2024-10-16 16:39:03 字数 161 浏览 6 评论 0原文

我定义了一系列自定义帖子类型(即“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风启觞 2024-10-23 16:39:04

您可以使自定义分类使用单选按钮而不是复选框,请查看此处: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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文