filtering the_excerpt()
If you remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' )
and add your own get_the_excerpt
filter you can do this.
The default filter (wp_trim_excerpt()
) can be found on line 2023 of /wp-includes/formatting.php
if you want to just modify that. The extent of what you need to do is just modifying which tags are allowed in strip_tags()
.
overriding functions.php
As for overriding the functions.php
, the codex is pretty clear on what you need to do.
update: Here’s a good tutorial on allowing tags in
the_excerpt()
Related Posts:
- Check if the user has explicitly set an excerpt
- How to override function in functions.php of parent theme?
- When is wp_trim_excerpt() called?
- Stripping shortcode from custom excerpt function
- Remove images from get_the_excerpt
- Custom page template how to check is_page from functions.php?
- display public excerpt for private post
- get_the_excerpt() not returning anything when post has no excerpt
- get excerpt without images
- Allow latex in wordpress excerpt
- Custom excerpt legnths for specific pages
- How to filter out shortcode when displaying the_excerpt() in the loop?
- Using “Read More” link with custom excerpt
- How to display post content instead of excerpt
- Using Schema with `the_excerpt`
- Custom Post excerpt not working correctly
- Limit length of first excerpt in the loop
- new_excerpt_more link not working properly
- Excerpts are not displayed by a shortcode on category pages
- How to display retweet count and likes in the meta above the excerpt
- Setting a default text for excerpts of a particular category
- Remove links from the_content when using filters wp_trim_excerpt
- Excerpt for pages not showing
- How do I pull excerpts from pages?
- WordPress Excerpt – How to remove the first link using functions.php
- Strip div From Excerpt
- How to change value of variable in theme file with functions.php WordPress?
- first paragraph of the_content as meta description
- Adding Read More to Custom excerpts
- Limit number of characters in different excerpts
- the_excerpt function not showing image
- Appending „read more” to the excerpt conditionally
- Hide disclaimer from summary excerpts
- How to make an If Else on Excerpt Filter
- getExcerpt: Make ellipsis appear only if character limit is reached
- need help with ‘… read more’ excerpt in functions.php
- Excerpt length: get 2 paragraphs
- Check if excerpt is empty at loop-portfolio
- Can’t change excerpt length and more tag
- More link – not text
- How to add an excerpt and read more link to a page?
- Force resize for all video content
- Adding a filter to my posts
- Excerpt – First Sentence & Read More
- Vimeo video play button color function
- function to show youtube videos within excerpt – if condition and apply_filters
- How to run a function every 5 minutes?
- Upload Multiple Files With media_handle_upload
- Add custom template page programmatically
- How to override admin-bar style
- Woocommerce add to simple product attribute programmatically [closed]
- How can I tell if I’m on a login page? [duplicate]
- Enqueuing Script in functions.php vs on the page
- Allowing SVG uploads in media uploader without plug-in
- What does the author_nicename parameter do in get_author_posts_url()?
- Members only site – still need the lost password page accessible
- Load JS Script only for custom post types
- How to overwrite / extent wordpress function is_email
- WordPress upload_mimes not working for front-end uploads of 3D files
- Add caption functionality to custom WordPress theme
- List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?
- Removing permalink from post thumb in twentyeleven
- Product object returns no sale price
- meta tags doesnt fetch data from permalinks
- How to know if user logged in
- Option Tree integration of Custom CSS
- Remove “Published On” inside wp-admin
- Can’t call Javascript function – scope?
- Deprecated function get_user_by_email($email)
- header_image() with CSS
- Shortcode parse error – wrong syntax
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Getting commenter meta
- Run a jquery script on on a certain template page
- Can’t add_action to ‘save_post’ and get it to fire
- I changed Functions.php and now I get “cannot decode raw data NSURLErrorDomain:-1015” (not blank)
- How to load jQuery in TOP of wp_footer?
- How to fetch custom post type by variable date?
- two search forms on the same page
- Getting out side of wp root folder from function.php using absolute path
- current_page_item is missing inside wp_nav_menu
- Change default upload images size for contributors
- Strange error from functions.php files (wp_register_script)
- file.php not loaded?
- How to setup a popup registeration page in wordpress with function.php
- How to add if statement on WordPress shortcode output
- Why does modifying the “read more” link remove the link class?
- Woocommerce product price change
- Allow user only create specific tags
- How to display different blocks for mobile and desktops
- Help wiht adding fullcalendar.io to a WordPress page
- WP Enqueue Script Error
- Enqueue JS + CSS via a child theme functions.php file?
- Move product attributes after summary on single product page
- How to add number to wordpress count function?
- Custom Nested WordPress Comments with avatar
- Functions file mods and CPU
- How to overwrite ‘read more” text for artmag theme
- How to display milliseconds instead of seconds using timer_stop function? [closed]
- How to automatically load Google Fonts on pages only as they’re used?