You could store the length like this.
function store_excerpt_length($length) {
update_option( 'excerpt_length', $length );
return $length;
}
add_filter( 'excerpt_length', 'store_excerpt_length', 1000 );
Then use the following code to get the length.
echo get_option( 'excerpt_length' );
Related Posts:
- GET the excerpt by ID
- How to end the excerpt with a sentence rather than a word?
- Modify ‘Read more’ link adding a new class
- Remove image caption from post excerpt
- How to add an admin function only to posts, not pages?
- How to customize read more link
- Custom wp_trim_words() function not trimming right
- How to show post(excerpt) from specific category on wp page?
- How to link up “read more” on excerpts hack from WP Recipies
- Append Text to $post->post_excerpt
- Frontend Post Excerpt field mapping
- Allowing the SoundCloud player to appear in a post excerpt
- Auto Refresh Post List after X seconds
- How to show video from specific category on sidebar?
- How to show a full post, not just an excerpt
- Get post excerpt and title by specific post ID?
- Custom excerpt length filter doesn’t work
- Display most recent post in full, excerpts of older posts
- Modify WP_Post before processing
- Print a message if excerpt is empty after posts have been publish/update!
- get_the_excerpt() is not working as expected – returns wrong text
- How do I display some posts fully on the homepage, and some as an excerpt only?
- How to display excerpt post on hamepage and archive pages?
- Displaying post excerpt using wpdb query
- How to disable the_excerpt from one post
- The_excerpt() doesn’t parse – how to change that?
- Trying to edit archive.php to only show post extract, with featured image
- Show metabox value last post excerpt, title and link
- Hook for changing excerpt content when excerpt not set
- Change the number of excerpts displayed in search results layout
- the_excerpt is displaying excerpts of every post
- Why excerpt is Displaying same in Random Posts list
- content summary of a post disappears If an images added at the beginning of the post. how to solve it?
- WordPress Excerpt Paragraph Limiting
- Calling Permalinks With PHP
- How to Remove HTML Elements from Post Excerpt?
- How to add text before post_excerpt in Gutenberg
- Why is WordPress showing a blank excerpt for just one of my posts?
- Related post not showing table of content
- How to limit wordpress the_excerpt() dynamically
- Moved a website and excerpts don’t work for old posts
- Enable HTML Tags in WordPress Post excerpt
- How to display post excerpt beside post list inside Post of Dashboard
- Trim excerpt to first paragraph
- Nothing appears using get_the_excerpt() in category.php
- Post List Widget with custom posts and editing the Read More Link
- Show category post with excerpt text
- Add a minimum word count to Excerpt (and how to force Excerpt as a rule for WyPiekacz)
- How can i show only 30% of the “the_content(“More…”)”?
- Using the_excerpt() some posts are truncated and some are not
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- wp trim function not working
- excerpt in template for specific page
- Show full post only to loged-in users
- Read more opens attachment
- Print Current Post Index number within Loop
- Front-End Post Submission
- how to get a different html for odd/even posts?
- How do I create a link that will always show the latest post?
- How to display posts by current user/author in a custom page template?
- Display all search results
- featuring old articles without messing up with the archive
- Add default content to post (for specific category)
- Is there a plugin that creates a WP post based on a Twitter account’s hashtag?
- blog page showing only first post
- Human Time Diff, change mins to minutes
- Including text at the end of every post
- same template for multiple custom post type single
- Display the Content of a Post with qTip2
- Scheduled posting not working
- Converting multiple loops into one single loop with pagination
- How to set post expiration date and time and move the page to archive after expiration [closed]
- .current-menu-item class on custom post type children pages – again?
- Run a function when post is deleted?
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Theme removed “Edit Post” link on the front end. I wish it back
- Custom WP_Query with complex ‘post_status’ argument
- Saving category to a post, before publishing the post
- Bulk delete WordPress posts with phpMyAdmin
- How to create a sub post?
- Check if a custom post type has already been created
- Uploading images in custom post form
- Unabled to Change Permalinks – Even Using the “Edit” (Resets to Original Permalink on “Update”)
- Get post related to particular meta box? [closed]
- Exclude a category of posts in author template
- Open post within Foundation 3 Reveal
- marking a post that was sticky on category template
- Extract the last published post
- “Blog pages show at most” in setting not working
- My page shows some other content in WP
- WordPress get tags in “publish_post” hook
- What permissions does a role need for the user to be assigned as the author of a post?
- Checking if a post contains an html tag
- If taxonomy has more than 6 posts, display show all
- Post are not showing up
- Special Query: Title, Terms, Content – %LIKE%
- Add News Feed to bespoke website, only to one page on whole site
- How to display my categories in a list (to a post, not the sidebar)?
- WordPress post enumeration
- How to monitor the first publish date?