To show your custom excerpt more text when a post has a manual excerpt, you can filter the excerpt using the get_the_excerpt
filter, use has_excerpt()
(http://codex.wordpress.org/Function_Reference/has_excerpt) to determine whether the post has a manual excerpt or not, and append the output of your already-existing custom excerpt more function to the excerpt if not. Here’s some code that I tested with your custom excerpt more function above, which does the trick:
function excerpt_more_for_manual_excerpts( $excerpt ) {
global $post;
if ( has_excerpt( $post->ID ) ) {
$excerpt .= new_excerpt_more( '' );
}
return $excerpt;
}
add_filter( 'get_the_excerpt', 'excerpt_more_for_manual_excerpts' );
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?
- 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
- 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
- Shared functions.php across multiple WordPress websites
- How to restrict actions and filters “properly” by conditions
- Extending auth_cookie_expiration based on user role
- Add inline css to theme
- Shortcode with custom content attribute?
- Add a Post Thumbnail to an RSS Feed with custom size
- Automatically add author’s name to post_tag
- Print Dashboard menu name and link
- Develop function get_template_part in functions.php
- Change comment_reply_link URL
- Ajaxing function in widget class
- Super simple shortcode not working
- what function can I use to automatically output og tags per page/post?
- Add error message on password protected page ONLY when password introduced was incorrect
- Select pages by category
- wp_register_script(… $in_footer = true) not working
- Output and filter data from a XML url
- Where to start learning more about wordpress templates [closed]
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- How do I create a function that simulate the click on Update button for all posts?
- Multisite Ajax serialize return error [object Object]
- PHP mixed with some JS code to update WordPress theme settings
- What does this code do? (Injected code hacked)
- Wp admin – Set default value to 999 in comments
- wordpress use single ajax in place of multiple ajax requests in a smarter way
- Can’t properly set the_title add_filter to show short_URL
- WordPress function, Run using Crontab
- Infinite counting in WordPress
- Tags break custom Excerpt function
- Create custom function for hero image
- Can set_post_thumbnail be used to remove a thumbnail?
- Specify multiple categories for custom post template – FATAL ERROR
- Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?
- How do I find the code executed when wp_head() is called?
- Problems with functions.php! Error! [closed]
- Output comment_author in array
- Need help making a short code work
- sort title descending with title with number
- Add #primary at the end of navlink permalinks on single posts
- Is there anyway to force is_singular() to be true when not loading template?
- Postback redirect through add_action is not triggered
- How to add class dynamically from templates
- How to change form action of wp-login page with a function
- Translation Function missing text-domain [closed]
- Retrieve a custom form field modified by a filter
- Custom taxonomy not refreshing page on add
- Pagination in Search result
- Custom field not updating via functions upon publishing
- disable WP_error: authentication_failed
- Create input select image URL?
- Dynamically Generating User Meta Field
- Changing functions.php and .htaccess files
- Code in functions.php appearing on front-end and dashboard [closed]
- Sessions in word press [duplicate]
- “woocommerce_output_related_products” not working
- Add functionality to block comment authors in the Comment edit pag