wp_terms_checklist display selected categories only
-
For a custom post type I’m trying to display the terms checklist but I only want to display the ones that are “checked” or selected. In other words, I don’t want to display the entire list, just the selected items.
The Codex states:
descendants_and_self
(boolean) Display only categories that apply to this post and their children or display all categories. The default is false (display all categories). Valid values:- 1 (True)
- 0 (False) – Default
I have not had any trouble getting the checklist to display. The correct boxes are checked but the problem is that the empty boxes are shown as well. If I enter a “descendants_and_self” parameter of 1 or true the checklist doesn’t display at all. Am I doing something wrong or is this a bug in the function for version 4.1?
P.S. it would be really nice if this function had a “parent” parameter to display only child categories for a specified parent.
The topic ‘wp_terms_checklist display selected categories only’ is closed to new replies.