Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?

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:

  1. Admin Panel – Disable Moving Selected Terms To Top of Metabox
  2. How to display non-hierarchical taxonomy as terms with checkboxes?
  3. Render Selected Categories in Admin Edit Post Screen differently
  4. Want to hide some categories from the categories meta box in the post editor for the two specific user roles
  5. Why does the argument list_only do on Walker_Category_Checklist::start_el?
  6. How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
  7. How to get selected taxonomy or category ID if using custom walker?
  8. Custom meta boxes ID prefix showing on first category but not others
  9. Two related taxonomies. how to filter terms in second taxonomy depending on selected term in first taxonomy on Post edit page?
  10. WP 4.7 in_category change?
  11. Get Meta Keys of Custom Categories
  12. Get posts of a custom post type from category from taxonomy?
  13. Illegal string offset ‘taxonomy’ in
  14. Style a category from category list
  15. How to restrict the amount of categories/post tags/terms for a post type post
  16. Same menu for different taxonomies to reach different content
  17. Change categories count to include media attachments
  18. How to schedule categories?
  19. Let user select their own category
  20. Copy post taxonomy?
  21. How could I write a get_categories_by_year() function?
  22. Get posts in a subcategory of a chosen parent
  23. Setting selected term_id with wp_dropdown_categories?
  24. Filter categories/tags to display in multiple metaboxes for selection in back-end
  25. Check is category parent with ids from the childs – get_term_children
  26. creating categories programmatically
  27. Natural sort / ordering wp_dropdown_categories
  28. WP Category Meta plugin fix? [closed]
  29. How to get posts using category slug in ClassiPress?
  30. Best way to categorize/populate a magazine style layout
  31. Combining these queries? (Same taxonomy term + same category as post)
  32. how can we bring category metabox to Media Library/Upload New Media Page
  33. create relationship between posts from one category and posts from another category
  34. sidebar troubles, taxonomy trouble
  35. Displaying posts of given category
  36. wp_dropdown_categories() show elements checkbox
  37. get_the_category – display only a single category for a post (not all categories)
  38. display category with background color
  39. Category post count is not correct
  40. Disable Category Taxonomy
  41. Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
  42. WordPress Default Category and Custom Taxonomy Selected Attribute not Working After Searched in wp_dropdown_categories Array
  43. Automatically adding tags and categories into Post Excerpt for searching
  44. How can i add service category here? [duplicate]
  45. Show subChild categories
  46. How can i change sort category view starting from child then parent, not alphabetically
  47. WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
  48. How to set the same base url for two different taxonomies?
  49. Taxonomy custom check box meta field not getting saved
  50. Limit categories to hierarchal depth of 2
  51. How to set acf color field as background color to product category
  52. How to target all woocommerce categories that don’t have any subcategories in them?
  53. Show the parent taxonomy by creating shortcode in woocommerce?
  54. Remove “Category:” from Post meta
  55. How to remove an item from a custom Walker_Nav_Menu
  56. Filtering posts in category by tag URL
  57. WordPress Portofolio Conditional Templating – functions php
  58. Displaying data from custom fields on a specific category page
  59. Parent Category and Subcategory default text generated with category
  60. Get WooCommerce product category list in functions.php
  61. Post List by category and under custom taxonomy
  62. Bulk assign posts to a category using SQL (MySQL)
  63. get taxonomy list in a page in the wordpress
  64. Number of categories slowing down the site
  65. Please tell how to stop the category from showing up on posts
  66. Get meta values from parent post and save in child post
  67. Image Upload Custom Form Field for Category and Custom Taxonomy
  68. Meta Box: display single image on an archive-template
  69. outputting taxonomy hierarchy
  70. Confused about category.php template – not working
  71. How to get the term id inside the start lvl method of category walker?
  72. Filter custom taxonomy posts via AJAX
  73. Create duplicate category page with content variations
  74. Why use hierarchical taxonomies instead of many custom taxonomies?
  75. Renaming default category taxonomy?
  76. How get all media from a posts category by db?
  77. How to echo Tags and Categories as plain text
  78. How can I add metaboxs to Admin Bar?
  79. How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
  80. How to Manage and link certain custom taxonomy?
  81. how to get postmeta info based on multiple categories?
  82. Display List of Categories Within a Custom Taxonomy
  83. Display Taxonomies in loop with template args
  84. How to add a post with new Taxonomy without assigning to default category?
  85. Looking for suggestions on creating simple database (Help!!)
  86. Grouping parent categories into sections
  87. get_adjacent_post_link excluded_terms ignored
  88. Match two taxonomies to display a specific content
  89. How can I hide the category term for posts with none set?
  90. Taxonomy for custom post type not found
  91. Category base 404 – fix
  92. Why is my post categories not displaying?
  93. Display only the latest post
  94. Problem importing categories and sub-categories
  95. Return selected categories only in custom page meta box?
  96. How to add all categories into an array and extract the categories names and use it with a custom meta box
  97. Assign a category by user and customize the edit-tags.php?taxonomy=category page
  98. list taxonomy based on taxonomy
  99. get IDs from links categories
  100. Multiple Parent Category URLs
Categories categories Tags categories, metabox, post-meta, taxonomy, walker
How to get the particular product quantity in orders in Woocommerce [closed]
Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress