To expand on Mark’s answer, there’s not much (generally) available in the way of filters in the default WordPress widgets (except for perhaps widget_text).
But adding your own custom widget is easy – put this in your functions.php:
require_once("my_widget.php");
add_action("widgets_init", "my_custom_widgets_init");
function my_custom_widgets_init(){
register_widget("My_Custom_Widget_Class");
}
Then you simply want to copy the existing categories widget from wp-includes/widgets/class-wp-widget-categories.php to my_widget.php in your theme, and change the class name to the same name as that used in the call to register_widget() above.
Then make whatever changes you like! I suggest changing the title too so you can distinguish it from the default Categories widget.
Related Posts:
- How to hook into unregistering a widget instance?
- Filter Widget Title Wrap
- Is it possible to remove the filter from 4.8 text widget?
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- WordPress tag cloud add more links
- How to add a class to Tag cloud widget link?
- How to make a widget expand wider than the column width when editing its settings in the admin
- Warning: Missing argument 2 for widget_title filter
- Add Bootstrap Classes to Recent Posts Widget
- include specific Pages to wp_list_pages with filter
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- I’ve set up an extra field for all the available widgets. How do I show it’s value in the front-end?
- Archive Widget – Count only parent posts
- Widget image reorganize layout
- How can I change the button text of a custom widget?
- WordPress Tag Cloud Filter Prevents Widget HTML from loading
- How can I add a prefix to titles displayed in sidebar using function.php?
- Filter WordPress Archive Widget to exclude posts with specific custom taxonomy term id
- Output dynamic_sidebar_params in wp_head
- Filter on widget-title does not work with custom links
- How to use apply_filters(‘get_calendar’) to change get_calendar() output?
- Filter widget_pages_args not working in Pages Widget
- Woocommerce price filter widget always shows max price of most expensive product in the whole shop
- Remove classes from body_class
- Why is javascript allowed in my post content?
- Is it possible to filter comments in a post so a user can only see the comments they have written?
- Where to hook into post content?
- What hook do I use to edit the post statuses option in admin?
- Customizing WordPress the_title with add_filter
- How can I send data to admin-ajax via JS Fetch?
- Disable resizing of gif when uploaded
- How can I display image metadata?
- How to prepend text to the_content, but after img/shortcode
- How to enable visual editor when editing comments on the dashboard?
- Can’t get wp_title filter working in twenty sixteen child theme
- add_action uses ‘echo’ add_filter uses ‘return’, why?
- How to trigger the core WPLANG to make automatically set a language when the theme is activated? [duplicate]
- Remove tags from the kses filter
- Overwrite default WordPress wording
- Why anything done on comments_array hook gets reset?
- How to get all the predefined do_action() calls from an active theme
- WooCommerce Variable Product Price – Where is “From” text generated from?
- Using ‘posts_where’ on a query with a custom field
- Wrap h1-h6 in a div
- add filter login_redirect does not contain original requested redirect
- How to add numeric slug for child page in WordPress 5.9?
- Custom Login Errors and variables I can use
- How to order by taxonomy using wp_query
- ‘the_content’ filter removing html tags from post content
- Feed, RSS not able to clear the cache and cannot change the limit of cache life time
- WP action/filter to modify title before header output and article output?
- WP Filter to change the URL of an Anchor wrapping the last gallery image
- Gutenberg – Add align controls to a custom block
- To add a custom filter based on a meta field
- I can not include page to wordpress function add_filter, the_content
- Add default user field to WooCommerce checkout [closed]
- Filter to shorten column content on edit-tags.php
- Proper after_setup_theme and wp_head cleanup
- Custom wp_query time filter on meta_value
- get post id within add_filter()
- Run posts_where and posts_join only on the main query
- Media upload default title from file name
- run shortcode in excerpt of single custom post type
- Use of comment_reply_link_args filter
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- Error using wp_mail inside custom function
- Add/remove CRON action depending on variable
- Stripping URLs & Email from post submissions
- comment_for() Custom fields not visible when user is logged in
- Filter authors on meta value
- Override email_exists function
- Access post ID in “content_save_pre”
- Remove pretty photo style and script if not exist!
- Gallery stripped from excerpt of post
- Add_filter rel=”prettyphoto” to WP3.4.1
- BuddyPress – A hook available to hide custom born date on public profile view?
- How can i filter wordpress users by custom feild?
- How to filter the source URL of all images on every page
- auth_redirect() doesn’t send users to the page where they orginally tried to acces
- How to redirect a unique link based on login status
- Custom sort orderby question
- Override wordpress audio playlist
- Hook to add content after date in post?
- How to bridge the gap between dynamic back-end data and front-end output?
- How to loop year & month condition together to filter correctly via AJAX?
- Add Index to Item in WordPress Gallery
- How to add_filter only when content is not empty?
- filter out
- Filter template text
- WP Dashboard -> Posts-> Filter > BUG!
- add_filter not working inside if function
- How to filter posts in admin by before date or by post status ‘future’?
- add_filter with specific thumb names
- Override typo in multiple parent theme files?
- WooCommerce comments_template Filter Not Firing
- Footnotes with dynamic title attributes?
- Can you call a filter hook by “add_action”?
- Using the REST API filter, including two meta_queries breaks the response for one custom post type
- How do I query Pending posts?
- Load More : Admin Ajax 400 Bad request, returning 0