Ok, I found a solution.
I’ve found the filter excerpt_more that is used to show the string shown within the more link (if theme use standard WP functions).
So, to achieve this, we need to hook the excerpt_more and use a lower priority of the one used by the theme.
In my example, this
add_filter('the_title', static function ($title) {
return $title. '-boom';
});
adds -boom string in both text and excpert, and this
add_filter('excerpt_more', function ($more_link_element) {
$more_link_element = str_replace('-boom', '', $more_link_element);
return $more_link_element;
},9999,1);
removes it from the excpert
Related Posts:
- Give “Read More” precedence over excerpt() word count
- Read More in the actual excerpt
- Remove description from on Home
- Get excerpt from $post->post_content
- Filter Widget Title Wrap
- Don’t replace “|” with Empty String (“”) when generating slugs from title
- How to use the_excerpt in a filter hook?
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- add_filter on “the_excerpt” only works when post does not have excerpt
- Alter only the page title, not the post titles within
- Changing document title only on a custom page template
- Filtering ‘the_title’ with option to return subhead?
- wp_title() empty on a static front page
- End excerpt at the end of the sentence
- Can’t change the title tag with wp_title filter
- get_the_excerpt() with fallback like the_excerpt()
- Setting title using wp_title filter
- Add a Span Around a Product Title in WooCommerce [closed]
- Exclude filter on front page
- How do I filter get_the_excerpt() but keep all of its functionality intact?
- Buddypress: Edit activity when new blog post [closed]
- How to make a button?
- Wrap h1-h6 in a div
- Variables in post title
- Why in archive page doesn´t show read more button with excerpt?
- the_excerpt filter with an empty excerpt
- Is it possible to use multiple spaces in title?
- WP action/filter to modify title before header output and article output?
- Access get_the_title() from ‘excerpt_length’ filter
- How do I override the_excerpt so that it will display full content?
- the_excerpt filter doesn’t work as expected
- Excerpt is being added above the content, but it should be after it
- run shortcode in excerpt of single custom post type
- apply_filters(‘get_the_content’, $content) + Except
- Trimming a custom field to a length
- Filter media upload attachment meta
- Prepending character(s) to a custom tag title?
- Use of comment_reply_link_args filter
- Filter page title (displayed in browser tab) of wp-login
- Adding html banner to posts
- Apply wordpress filter checking category
- Strip $before & $after strings from a page title
- Add Filter – Pass Variable (PHP < 5.3)
- add_filter( ‘the_title’ gets through this if statement twice
- Modify WordPress Page Title ()
- Create different flavours of excerpt
- How to filter page title for certain page?
- Cutting off excerpt with first sentence
- get_the_archive_title hook unwanted changes!
- Auto-generated excerpt with shortcode and read more button/text link
- is_page_template() doesn’t work with excerpt_length filter
- Hide H1 Title using the_title filter
- Admin filter/error if post title is too long
- the_excerpt() does not work with has_excerpt()?
- get_the_excerpt on mobile still displays continue reading
- Can’t change excerpt length and more tag
- Custom excerpt_more filter not working when tag is present
- Auto append text after the title?
- Why does using excerpt_more filter change link location?
- Only show read more text when when wp:post-excerpt meets excerptLength
- wp_headers vs send_headers. When to use each?
- Where to hook into post content?
- What hook do I use to edit the post statuses option in admin?
- Check if a filter or function has been already been called
- How to change Woocommerce breadcrumbs content?
- I’m using a filter to remove the tags auto wrap, but there still wrapped elements?
- Cron schedule interval through plugin options?
- wpmu_signup_user_notification filter not working
- Add $more_link_text parameter to the_excerpt()
- How do I add a listbox to the TinyMCE editor?
- Why anything done on comments_array hook gets reset?
- get_header and hook avoid normal call
- Dropdown filter in custom posts
- How to order by taxonomy using wp_query
- Feed, RSS not able to clear the cache and cannot change the limit of cache life time
- To add a custom filter based on a meta field
- How to create Woocommerce Product Filter Widget [closed]
- Add default user field to WooCommerce checkout [closed]
- Filtering Comment Reply Links (comment_reply_link_args) for “infinite replies” in nested comments
- Woocommerce “added to cart” message on main(home) page
- Add filter for specific post type only
- Avoid user registrations with specific email provider
- Should I remove_filter in order to replace a filter?
- How can I specify the post status of an untrashed post?
- filter hook to load a different post/page on current post/page
- Rewrite rule and display of post
- Passing variable from child theme function to parent theme filter
- How to disable a wp filter in a certain admin panel page
- Is there a filter to programmatically change the HTML tab switching output of the page editor?
- Why does admin_body_class not work?
- post_orderby filter breaks function
- “Continue reading” not on some posts, full excerpts not shown
- Counting a WP_Post Object value in an arary, using a filter?
- Restrict access to custom post type and filter from every query
- Custom xmlrpc request does not pass parameters?
- How to turn this customized core function into a filter/action in functions.php?
- Categorize posts on a page o the basis of category of other post on the same page
- manage_users_custom_columns filter not firing callback functions
- How to use apply_filters(‘get_calendar’) to change get_calendar() output?
- How to add custom HTML attribute to reusable block div in WordPress admin