You can get the diff between your 2 contents and then add to the first one a given number of words like this (not sure, but give it a try 😉 ) :
global $more;
$more = 0;
$content_cut = get_the_content( '' );
$more = 1;
$content_full = get_the_content();
// Get the diff
$content_diff = str_replace( $content_cut, '', $content_full );
// Get 10 first words
$some_more_content = wp_trim_words( $content_diff, 10, 'link_more_here' );
// Add it to the end of cut content
$content_cut .= $some_more_content;
echo $content_cut;
The linl_more_here parameter is optionnal and is normaly a tag with the permalink of your current post.
Related Posts:
- Excerpts not showing on main page
- Get excerpt using get_the_excerpt outside a loop
- How can i display the content in plaintext
- remove tags from the_content
- How to force excerpts / teasers in the loop
- Get ID of a page containing secondary loop in content
- Exclude filter on front page
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Content/Excerpt length control for a specific loop?
- Can I use both a custom excerpt and a trimmed excerpt?
- Combining the_excerpt with the_content
- Display content of page template (get_page)
- the_excerpt not showing posts
- Using get_the_excerpt() Before The Loop
- How to load all pages into one page with their templates
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Unable to change the “Read more” text inside the_excerpt
- How to get the excerpt for is_home() outside of the loop isn’t working
- The_excerpt() doesn’t parse – how to change that?
- How is WordPress changing the content markup?
- Accessing the Posts page Content
- “the_excerpt” in loop just keeps repeating first post?
- Using jQuery .after inside loop
- Announces with different formatting dependently on a number
- Only Show Excerpt After First 3 Posts
- Excerpt isn’t working or am I missing something?
- Limit article to 100 characters. Can’t use the_excerpt…
- Making a specific page wordpress compatable that is not index
- Return only content in excerpt field in loop
- How to add excerpt in loop in Twenty Eleven theme?
- Single Loop With Dual Content Area
- the_content() “crashes” for single pages
- Split Content and Gallery
- Do I need to use The Loop on pages?
- How to return loop contents
- How to get the first image gallery of a product in woocommerce in a loop
- the_content and wp_link_pages
- the_title(); works in a page template, outside the loop. Why?
- Add 20yrs to post date, and then query
- When and Why is is_singular(‘my_cpt’) true while in_the_loop() is false?
- as a shortcode within the loop?
- Getting page ID inside loop
- How to show just private posts in loop
- How to paginate this custom loop? [duplicate]
- wp alchemy multiple image uploader output images to template
- Running a loop with a custom query string on a custom page template
- Complex query and posts pagination
- Displaying terms based on loop posts?
- Custom post type appearing within the previous one on archive.php
- How do I go about looping through a advanced custom field on a particular page inside of another page
- How to inject posts from certain category on home page
- Limit length of first excerpt in the loop
- $WP_Query: How to display excerpt on first post only
- The Loop – mixed ASC and DESC order
- Showing sticky posts with get_posts()
- single.php – how to mark current page in the loop
- Get 1 more post in loop
- Pagination not working in category listing [duplicate]
- Calling the_excerpt from inside a plugin template file
- Category links including all posts
- Custom loop ordering not working
- First archive page with a few posts
- Hiding a row in the loop if empty
- get_delete_post_link() inside Loop stubbornly returns nothing
- Comments_template doesn’t work
- Get markup for post without loading into the template
- How can this multiple loop have pagination as described?
- Default featured image set as background image [closed]
- Breaking up the results of a loop
- Is file_exists() compatible with timthumb.php? [closed]
- Set depth of pages to fetch
- Trying to get all links in my posts
- Creating a User-Adjustable chart in WordPress
- Archive: Lists itself
- Reorder posts in a loop: have the posts by one particular author below the others
- How to execute a user loop with shortcode
- how to get author comment inside the loop?
- How to create loop in custom page, and get id from url into this loop?
- Link Button url count php and wordpress
- ACF field not appearing correctly in loop
- Posts are being displayed from old to new, in ascending order
- Loop in taxonomy for terms and post
- WordPress Tags in class
- Display articles related to a custom field on a page
- The Loop isn’t working
- Changing the loop w/o killing category links
- Custom loop page with post navigation
- Pages with a loop (index, archive) are loading the first image as post_thumbnail
- the loop – how to control whether wp or plug-in runs it
- stuck with template hierarchy
- Modify my code – which takes the first sentence of the post and use it as a h2 tag – to work outside the loop
- Display a paragraph in the index page that won’t be displayed in the single post
- How to show only specific tag in wordpress loop
- Different style for first two (sticky) posts
- WooCommerce – Checkout suddenly stops working [closed]
- Post content not showing
- Want to images load first then title in WordPress loop
- How to add a continuous number to HTML tag attribute value inside The Loop [closed]
- WordPress Not Sorting By Custom Field
- How can I create an entirely new, separate display of posts?