Manual excerpt still cutting last word
I read through the posts that discussed this issue and the solution was to use the "[BUGFIX 3.4.1/3.4.2/3.4.4] Getting Configure Excerpts to work in all cases."
Since I have the newest version of Atahualpa (3.4.5.1) installed that fix has already been applied. Yet, I still have the problem where the last word in my manual excerpt does not show up for each post. I can add a random word to the end and it will then add that last word I want but I was hoping there was a real fix somewhere. I also have Wordpress 2.9.1 installed |
I have the same problem! (With atahualpa 3.4.5.1 or 3.4.4 and WordPress 2.9.1). If I turn to Atahualpa 3.4.1, the manual excerpt is shown perfectly with all words.
|
I was having the same issue, and I found a slightly simpler workaround than leaving an extra word.
Just leave a space after the last word. That worked for me. |
In fact, this problem occurs because of some inconsistent logic in the same function that's mentioned in "[BUGFIX 3.4.1/3.4.2/3.4.4] Getting Configure Excerpts to work in all cases."
When faking an excerpt from content, the function bfa_wp_trim_excerpt cleverly counts the words in the article and, if the wordcount is over the limit, removes the excess words and adds the "read more" link. This almost works, almost by accident, when using real excerpts, because the limit looks like zero, so the "read more" link always gets added, which is what we want. Unfortunately, since the function "thinks" the excerpt has excess text, it also removes the last word, unless the article ends in a space. A quick fix is to make the conditions explicit. In functions.php in the Atahualpa theme directory, replace Code:
function bfa_wp_trim_excerpt($text) { // Fakes an excerpt if needed Code:
function bfa_wp_trim_excerpt($text) { // Fakes an excerpt if needed I didn't want to tweak the code too much... However, it would be cleaner to separate the two cases. Pseudo code: Code:
If there IS a real excerpt ( Hope this helps. |
Wow! Thank you! It works.
|
Blaise,
Good find! !! When I was coding the original fix, I must have missed the manual excerpts, there are so many cases that make this a mess. I'll see if I can get Flynn to get this into the next release. |
All times are GMT -6. The time now is 11:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.