Is there a way to have custom excerpts obey the excerpt length? For a site, I need to use custom excerpts sometimes in order to edit some text from the beginning of the page but I see that, in such cases, the excerpt length I have setup is not respected. Is there a way to correct this?
On the settings page ( WP admin > Settings > Excerpt) there’s an option called “No Custom Excerpts”. Check the checkbox. Let me know if that works as you need it.
But that won’t help, it’ll disregard the custom excerpt and generate one from the content.
There’s no option for it at the moment but we could add it to the list for the next update. Currently recovering from an injury so I’m not at 100% but I think it could be released sometime next week, would that work out for you?
Many thanks for your feedback and sorry to hear you have been injured.
Yes, I’ve seen the other option but, as you say, it’s for something else. No problem for next week as far I’m concerned but wishing you first and foremost a prompt recovery!
BTW, I would appreciate it if you can clarify the other option for which I sent you the screenshot before. “Filter”. What does that mean exactly in fact? What is that for? Should I use both of those the_excerpt() and the_content(), none or just one of them?
For the excerpts output some themes use the_content() and some use the_excerpt()
The option allows you to allow or disallow our plugin to filter (modify) the output of those functions.
It doesn’t change how our plugin generates the excerpt, it just changes whether the plugin should do it or not.
Both the_content() and the_excerpt() functions are used by themes.
the_excerpt() specifically outputs the excerpt of the post (either the manually applied one or it creates it from the post content)
the_content() works a bit differently, on the singular page for the post it displays the full content, but on a page which lists posts (like homepage) it displays either the full content or an excerpt, depending on the settings. The tag <!--more--> is used inside of content to determine the cut-off for the excerpt.
That’s not directly related to the plugin, it’s just the different ways WordPress can handle excerpts and it depends on the theme which approach is used.
If you have the checkbox for the_content() disabled and the plugin is altering the excerpt then it means the theme uses the_excerpt() function to output the excerpt.
Excellent, many thanks for this update. Works great! I only noticed that when you check the first box the second remains greyed until you save changes and then you can also check the second one and save changes again. Not important but just in case you didn’t notice.
That’s most likely a cache issue, your browser still using the old JavaScript file. If you do a hard refresh CTRL + F5 a few times does it get sorted out?