Problem with wp_create_category

This function is declared in wp-admin/includes/taxonomy.php. This file will be loaded in wp-admin/includes/admin.php. And that now is called in wp-admin/admin.php. So the solution is: Use the hook ‘admin_init’ or require all necessary files manually. But don’t do that on every request.

wp_dropdown_categories() show elements checkbox

Good for @Tom J Nowell♦ solution would be more properly. But it still could fulfill the goal which add the extra function in your class. class List_Categories_Radiobuttons extends Walker_Category { function start_el(&$output, $category, $depth = 0, $args = array(), $current_object_id = 0) { $category_name = esc_attr($category->name); $radiobutton = ‘<input class=”form-check-input” type=”checkbox” value=”‘ . $category_name . … Read more

add current-cat class to single post page

the_category() uses get_the_category_list() to do its work, but this function gives you no way to specify classes. However, you can filter the output with the the_category hook. Since you know the format of the current category links, you can so a search and replace on them. It would look something like this (untested): add_filter(‘the_category’, ‘highlight_current_cats’, … Read more