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
- Control term order on a per-post basis
- Can a Child Category Have More than One Parent?
- Combine two taxonomies in a hierarchical tree
- Changing Top Level Items into Radio Buttons in the Categories Meta Box?
- Create terms when registering taxonomy?
- Add Thumbnail to wp_list_categories()
- How to Override default update_count_callback for category
- Assign different category colours to different categories in the main menu
- Does WordPress Offer a Way to Find All of the Categories that Don’t Have Children?
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- wp_list_categories, Add class to all list items with children
- Getting WordPress custom taxonomy/category?
- Display empty taxonomy terms with get_terms()
- Return category slug / title from category ID
- Connecting WordPress gallery to custom categories (taxonomy)
- How to get the number of child categories a specific parent category has?
- Get term by slug in Gutenberg
- How to get the depth of a category’s subcategories
- Hide post meta data on a specific category
- New categories are now going to 404s
- Best way to programmatically link to multiple categories (union/intersection) [closed]
- “Reversable” and “Re-useable” Subcategories (or other taxonomic structure)
- Get multidimensional array that reflects category hierarchy
- Can I use get_adjacent_post for specific categories?
- How to show author name only if the post is in a specific category?
- Taxonomy filter all children
- Force a user’s posts category
- Search Posts / Pages with multiple options?
- How to get the id from the custom category?
- How to filter out Categories for specific post types on WordPress Admin?
- Limit a meta box to a specific category
- Automatically exclude categories from metabox based on title
- How can i insert term in a specific language of Polylang?
- How to “group” (categorize) the Pages together?
- Is There a Difference Between Taxonomies and Categories?
- Use Tag input metabox style for Categories
- Custom taxonomy/category order
- Why don’t posts show up in my categories on the frontend?
- Custom Walker for wp_list_categories
- How many categories can WordPress handle before performance suffers?
- Targeting Parent Category Pages
- get_terms function not returning anything
- Include WooCommerce product to all child categories
- Hooking to walker_nav_menu_start_el to insert list of subpages
- Notice: Trying to get property of non-object in : custom fields category
- Is there a way to only show Custom Meta Data on single posts from certain catagories
- WP REST API not retrieving all categories
- How to display a value inside a post with a specified category from a category custom field? [closed]
- Grandchild Term Things Grandfather Term is It’s Parent
- Eliminate word from $term->name
- What Must to Display the “mysite.com/category” URL?
- Style a category from category list
- Same menu for different taxonomies to reach different content
- How could I write a get_categories_by_year() function?
- Get posts in a subcategory of a chosen parent
- Natural sort / ordering wp_dropdown_categories
- How to get posts using category slug in ClassiPress?
- Best way to categorize/populate a magazine style layout
- get_the_category – display only a single category for a post (not all categories)
- display category with background color
- Disable Category Taxonomy
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- Automatically adding tags and categories into Post Excerpt for searching
- How can i add service category here? [duplicate]
- How to set the same base url for two different taxonomies?
- 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
- Parent Category and Subcategory default text generated with category
- Post List by category and under custom taxonomy
- get taxonomy list in a page in the wordpress
- Number of categories slowing down the site
- Get meta values from parent post and save in child post
- How to get the term id inside the start lvl method of category walker?
- Create duplicate category page with content variations
- Renaming default category taxonomy?
- How to echo Tags and Categories as plain text
- How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
- how to get postmeta info based on multiple categories?
- Display List of Categories Within a Custom Taxonomy
- How to add a post with new Taxonomy without assigning to default category?
- Looking for suggestions on creating simple database (Help!!)
- Taxonomy for custom post type not found
- Why is my post categories not displaying?
- Problem importing categories and sub-categories
- Assign a category by user and customize the edit-tags.php?taxonomy=category page
- Show parent-child relationship for categories in the wordpress admin
- Order Categories by Character Count
- Images as Categories
- Quick Edit on taxonomy names results in error