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
- Get WordPress post content by post id
- Get page ID of page that is set as the posts page
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- Stop WordPress Wrapping Images In A “P” Tag
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to get ‘post_content’ without stripping tags?
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?
- How do I check if I linked to a post before I delete it?
- How to change the case of all post titles to “Title Case”
- Appending content with broken in 4.4
- How to get posts published between a date and today?
- ZIP up all images displayed in a [gallery] and offer as download link
- How to detect single.php (but not single-portfolio.php)?
- How to check if post meta key exists or not in wordpress database
- How to remove a column from the Posts page
- removing inline styles from wp-caption div
- What is the use of to_ping and pinged column?
- How to use “Add link” pop up for a WordPress widget
- Remove Categories / Tags From Admin Menu
- How to retrieve text only from wp_content() not from wp_excerpt()?
- Stop WP from creating “Sample Page” and “Hello World!” post
- Where is the old post permalink slug stored?
- How to Create Editable Blocks of Text for the Homepage?
- Keyboard shortcut for updating a page or post?
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Apply the_title() filter in post & page title, but not in menu title
- How to Change Order of Posts in Admin?
- is it possible to get next_post_link
- Get post content by ID