You don’t need an action, but a filter, because you want to do something with the result of a function. The filter is, predictably, called category_description In this way (didn’t test it though):
function wpse236947_trim_category_desc ( $desc, $cat_id ) {
// do your thing
return $desc;
}
add_filter( 'category_description', 'wpse236947_trim_category_desc' );
Related Posts:
- Accepted arguments value in hook functions
- Modify a function without editing template
- Override the WordPress core function wp_referer_field
- Insert Content Before div#main from the functions.php File
- Save_post – Warning: Cannot modify header information
- How Do I Unhook This Parent Theme Function?
- Issues with title-tag and document_title_parts
- Remove Actions/Filters added via Anonymous Functions
- Define custom Page Template without its own .php file
- How to influence the information displayed on widget inside wp-admin
- Extract image from content and set it as the featured image
- How to restrict actions and filters “properly” by conditions
- Add action hook conditionally – only when home.php in use
- Using add_filter() in Widgets
- How can I tell if I’m on a login page? [duplicate]
- Convert hyphen to underscore in permalinks
- Remove Page Title from Static Frontpage
- How to hook into the quick edit action?
- WooCommerce add_action hook results in 500 error
- How to update feed only 2-3 times a week (for Feedburner email)?
- Gravity Forms field entries into wp_query loop [closed]
- How would go about if I just want a temporary function?
- Get current page_id before loop, in functions.php
- Don’t delete a page if it holds users
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Passing values from a widget to a function within a plugin
- Which action does wp_update_user triggers?
- How can I get my Script to work on the Login page?
- Trigger a custom function when option are saved in admin area
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- Replace a menu with widget or a custom template file programmatically
- jQuery does not work
- How to edit the Tags within the image file URLs?
- Can’t properly set the_title add_filter to show short_URL
- How to add_filter html template to middle of content
- (Woocommerce) Order by price when entering specific category
- Is there a way to prevent a function/method from being called outside a specific hook?
- Call to undefined function is_home() or any conditional tags
- Possible to hook into Media Library preview File column and use a custom image?
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- login_headertitle is deprecated since version 5.2.0
- Changing where my author box is printed
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Add Adsense code between job listings – wp job manager plugin
- Replace admin header logo with an image
- Changing the text of Upload/Insert on Posts and Pages Screen
- Does hook have an effect on increasing the page load?
- What is the earliest Hook a Script can use?
- custom error message for empty username and password using authenticate filter not working
- post value to function with Ajax and jQuery
- Use action, filter, or hook to append HTML to WordPress plugin function
- Which method is more correct for removing WooCommerce Extensions menu item?
- WordPress hooks to call a function inside a construct
- previous_post_link inside of a function?
- Settings in functions.php used by a plugin
- Force resize for all video content
- add query string to all pages after user logged in
- delete_term is not working properly with add_action()
- Is there a hook that I can use when a fatal error occurs?
- Function attached to cron job not running but will run if called manually
- disable a specefic sidebar when user is log out
- Remove Actions/Filters added via Anonymous Functions
- remove_action on after_setup_theme not working from child theme
- add_action in a function, is it possible?
- How to reduce original image quality on upload?
- How to make post and comment count unclickable with dashboard_glance_items hook
- In WooCommerce I need to modify the thankyou.php page [closed]
- Add body class of category parent
- Why get_header() or get_footer() does not run twice if called in the same php file?
- Change parent theme file function in child themes functions.php
- gform_after_submission content appears immediately after , not in post body [closed]
- How to override filter in child theme?
- How to change a certain text or term of WordPress into a custom into the whole site?
- Find variables available at a given hook
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- how to change link of some wordpress pages
- Show excerpt for only first post in query
- Proper way of using functions in action hook?
- Same Conditionals Not Working on Two Different Hooks
- How to properly add function called by action-hooked function to functions.php?
- str_replace function in theme
- Pass info from functions.php to plugin
- Inserting a functions output after the content
- Handling Body class based on Template
- How to add nav menu items to a specific position within a menu
- Is possible add icon in title posts only in specific tag?
- WordPress Gravatar filter is removing my custom attributes
- Is there an alternative to get_template_directory_uri()?
- Adding an external HTML link to a post thumbnail
- Modify custom field input data before creating a new post
- Footer disappears when using the_content ( )
- woocommerce change currency per category [closed]
- Comment search plugin
- How to return hook data when multiple parameters are present?
- Control the srcset much more (not all sizes in it each time)
- 400 Bad Request – JavaScript App calling Custom wp-json endpoint
- How to use wp_enqueue_script properly?
- How do you insert code into the sidebar?
- Why might wptexturize have become re-enabled?