Yes, as the documentation for wp_terms_checklist()
stated, you can use the walker
argument (which is part of the $args
parameter for the wp_terms_checklist_args
hook) to use a custom walker which modifies the output of the Category checklist generated by wp_terms_checklist()
, e.g. the one in the “Categories” meta box on wp-admin/post.php
.
Example where the custom walker is in a folder named includes
:
add_filter( 'wp_terms_checklist_args', 'my_wp_terms_checklist_args', 10, 2 );
function my_wp_terms_checklist_args( $args, $post_id ) {
require_once __DIR__ . '/includes/class-my-walker-category-checklist.php';
$args['walker'] = new My_Walker_Category_Checklist;
return $args;
}
Related Posts:
- Admin Panel – Disable Moving Selected Terms To Top of Metabox
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Render Selected Categories in Admin Edit Post Screen differently
- Want to hide some categories from the categories meta box in the post editor for the two specific user roles
- Why does the argument list_only do on Walker_Category_Checklist::start_el?
- How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
- How to get selected taxonomy or category ID if using custom walker?
- Custom meta boxes ID prefix showing on first category but not others
- Two related taxonomies. how to filter terms in second taxonomy depending on selected term in first taxonomy on Post edit page?
- WP 4.7 in_category change?
- Get Meta Keys of Custom Categories
- Get posts of a custom post type from category from taxonomy?
- Illegal string offset ‘taxonomy’ in
- Style a category from category list
- How to restrict the amount of categories/post tags/terms for a post type post
- Same menu for different taxonomies to reach different content
- Change categories count to include media attachments
- How to schedule categories?
- Let user select their own category
- Copy post taxonomy?
- How could I write a get_categories_by_year() function?
- Get posts in a subcategory of a chosen parent
- Setting selected term_id with wp_dropdown_categories?
- Filter categories/tags to display in multiple metaboxes for selection in back-end
- Check is category parent with ids from the childs – get_term_children
- creating categories programmatically
- Natural sort / ordering wp_dropdown_categories
- WP Category Meta plugin fix? [closed]
- How to get posts using category slug in ClassiPress?
- Best way to categorize/populate a magazine style layout
- Combining these queries? (Same taxonomy term + same category as post)
- how can we bring category metabox to Media Library/Upload New Media Page
- create relationship between posts from one category and posts from another category
- sidebar troubles, taxonomy trouble
- Displaying posts of given category
- wp_dropdown_categories() show elements checkbox
- get_the_category – display only a single category for a post (not all categories)
- display category with background color
- Category post count is not correct
- Disable Category Taxonomy
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- WordPress Default Category and Custom Taxonomy Selected Attribute not Working After Searched in wp_dropdown_categories Array
- Automatically adding tags and categories into Post Excerpt for searching
- How can i add service category here? [duplicate]
- Show subChild categories
- How can i change sort category view starting from child then parent, not alphabetically
- WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
- How to set the same base url for two different taxonomies?
- Taxonomy custom check box meta field not getting saved
- Limit categories to hierarchal depth of 2
- How to set acf color field as background color to product category
- How to target all woocommerce categories that don’t have any subcategories in them?
- Show the parent taxonomy by creating shortcode in woocommerce?
- Remove “Category:” from Post meta
- How to remove an item from a custom Walker_Nav_Menu
- Filtering posts in category by tag URL
- WordPress Portofolio Conditional Templating – functions php
- Displaying data from custom fields on a specific category page
- Parent Category and Subcategory default text generated with category
- Get WooCommerce product category list in functions.php
- Post List by category and under custom taxonomy
- Bulk assign posts to a category using SQL (MySQL)
- get taxonomy list in a page in the wordpress
- Number of categories slowing down the site
- Please tell how to stop the category from showing up on posts
- Get meta values from parent post and save in child post
- Image Upload Custom Form Field for Category and Custom Taxonomy
- Meta Box: display single image on an archive-template
- outputting taxonomy hierarchy
- Confused about category.php template – not working
- How to get the term id inside the start lvl method of category walker?
- Filter custom taxonomy posts via AJAX
- Create duplicate category page with content variations
- Why use hierarchical taxonomies instead of many custom taxonomies?
- Renaming default category taxonomy?
- How get all media from a posts category by db?
- How to echo Tags and Categories as plain text
- How can I add metaboxs to Admin Bar?
- How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
- How to Manage and link certain custom taxonomy?
- how to get postmeta info based on multiple categories?
- Display List of Categories Within a Custom Taxonomy
- Display Taxonomies in loop with template args
- How to add a post with new Taxonomy without assigning to default category?
- Looking for suggestions on creating simple database (Help!!)
- Grouping parent categories into sections
- get_adjacent_post_link excluded_terms ignored
- Match two taxonomies to display a specific content
- How can I hide the category term for posts with none set?
- Taxonomy for custom post type not found
- Category base 404 – fix
- Why is my post categories not displaying?
- Display only the latest post
- Problem importing categories and sub-categories
- Return selected categories only in custom page meta box?
- How to add all categories into an array and extract the categories names and use it with a custom meta box
- Assign a category by user and customize the edit-tags.php?taxonomy=category page
- list taxonomy based on taxonomy
- get IDs from links categories
- Multiple Parent Category URLs