I was wondering how I could setup a taxonomy metabox on a post edit page that would be similar to the “tags” kind (with search field and automatic suggestions), but without the right to add a new term.
So for example if I’m typign a word, I get suggestions of terms that I can use from the existing terms list, but if I type a word that doesn’t exist, then it doesn’t add the terms to the list.
EDIT
Actually, what I’m looking for is exactly the behavior of the “Search” functionality in the Menu Editor :
As this is a core WP behavior, is there a way to use it on post edit pages too ? I’m wondering because these blocks look exactly the same, both have the “view all” and “most recent” tabs, but “search” is only present in the Menu Editor.
I came up with a solution for your first question. i.e the tax metabox that only suggests terms from existing terms list but does not allow you to add new terms. The solution is jQuery based and modifies the default behavior of the tags (i.e non heirarchical taxonomies) meta box.
Limitation: Currently it only allows to add 1 term at a time, that is you can’t add multiple existing terms as comma separated values.
The code is also available as github’s gist.
I might do menu editor like metabox for taxonomy on next weekend. 😉
the solution below can be used as plugin as can be used in your function.php file too.
UPDATE: code updated to handle the return key as per @mike’s comment.
This question is a little old, but as I found it some other people may come and look for the same things.
This PLugin was helpful
https://wordpress.org/plugins/admin-category-filter/#developers
And u can manually add code to it or to your’ custumized theme’s functions.php to hide the parent category section or the ‘add new category’ button at all
A css display:none attribute to the div id will work perfectly.