This should remove the <p>
tags, but leave the styling by replacing the paragraph tag with a <span>
class:
function all_excerpts_get_more_link($post_excerpt) {
return '' . $post_excerpt . '' . '<span class="readmore"><a href="'. get_permalink($post->ID) . '">' . 'Continue Reading »' . '</span>';
}
add_filter('wp_trim_excerpt', 'all_excerpts_get_more_link');
Related Posts:
- Check if the user has explicitly set an excerpt
- How to override function in functions.php of parent theme?
- Show Video in Excerpt
- 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?
- 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?
- Adding a filter to my posts
- Excerpt – First Sentence & Read More
- function to show youtube videos within excerpt – if condition and apply_filters
- What’s the difference between esc_html, esc_attr, esc_html_e, and so on?
- Check if post is being published for the first time, or is an already published post being updated
- Is there a hook or function I can use to display all theme files being used on a current page?
- How can I remove the title “leave a reply” in the comment box in twentyeleven?
- Check if has any sidebar active on current page
- Login using the password from protected pages
- Remove tag on my RSS Feed
- Automated mark posts as featured every day
- Enqueuing External Javascript functions.php
- Child Theme Not Overriding Parent Theme
- Function to wrap the_content in a div
- How to run a function once on every post in database?
- Date/time limitation of posts where function must be executed
- Custom image size in Media Dropdown
- Trouble using antispambot()
- Post Pagination Showing Same Posts Every Page
- Access / Filter block variations in Gutenberg, in WordPress 5.6
- How to remove the excerpt in the Dzonia Lite theme
- retrieve current user meta data (custom fields included)
- Calling a function from anywhere, used in different places
- How do I redirect all 404 error url to Subcategory url
- async javascript and css for wordpress
- get_next_posts_link not working without parameter max_num_pages
- create filter in functions.php
- Logout Shortcode URL
- What is the Difference in bones_comments() and comments.php
- Custom Sidebar only on single post
- Can I have an additional functions.php file in WordPress?
- Shotcode argument issues
- Split Media Queries in different files!
- functions.php and conditional tags
- Need help with customalert that it would read on a normal page, but not in WordPress
- Child theme function.php causes fatal error
- How to print the current post depth as update notification?
- How to safely edit functions.php
- Linking Javascript in functions.php file
- Enqueueing scripts selectively & activation where needed
- Changing the text of Upload/Insert on Posts and Pages Screen
- Using One Function To Create Two Different Shortcodes
- Change Page Title
- How to Not Show posts on Category page?
- Put images in the media from url functions
- Paragraph spaces in email template function
- Including Font Awesome in a Custom Theme
- Trying to load JavaScript only on pages within a PODS category/ custom post type
- How would I correctly implement a new if statement in a child functions file?
- How To Show Shortcodes In WordPress Custom Fields?
- Language Switch Function
- How to debug function file causing white screen
- Change category checkbox into radio button [duplicate]
- Load CSS conditional on custom field is present
- Modify sub_menu function to show pages below a specifically set page
- Add custom class to all URLs on entire site
- Functions.php in child theme that loads CSS file breaks website
- Change conditional tag in wordpress without editing the core files
- How to add height and width dimensions automatically to archive descriptions