BUGFIX: 3.4.9 Excerpt length not working properly?
I am running 3.4.9 and I have Excerpt length set to 200, yet the articles cut off at about around 60 works or so. It is properly displaying the custom read more link so it is executing correctly I'm just not sure what the problem could be. I'm not placing any manual read more breaks into the articles themselves and, as far as I know, I have it configured correctly. Am I missing something?
|
what version of WP and what is the url?
do you have any '<!--more-->'s in the post? |
WP 2.9.2 and url is www.pvpgamer.com
No there are no more tags in the posts, which is really confusing me. The account info I sent you in PM should still be active if you want to take a look. |
Just a little update. Done some testing trying to figure out what's causing this and I'll give you a couple examples here.
Text of lead article with excerpt length at 20: Quote:
Quote:
Quote:
Quote:
Quote:
One other thing, I've set it up so that the <blockquote> tab is in the "Don't strip these tags" section so that they will show up on the main page, problem is if the expert ends in a blockquote the custom read more message will be included inside the blockquote as well. Solved that by just adding a </blockquote> to the beginning of my custom read more message but that's not a very elegant fix. Just something else to think about. |
Ok, I've figured out what is happening, but do not have a fix yet.
There are two issues: 1) the excerpt stops two words before the end of the post i.e. if you have a post of 120 words and excerpt at 125 - you see 118 words and then [...] post of 120 words and excerpt at 120 - you see 118 words and then [...] post of 120 words and excerpt at 119 - you see 118 words and then [...] post of 120 words and excerpt at 118 - you see 118 words and then [...] post of 120 words and excerpt at 118 - you see 117 words and then [...] 2) for some reason multiple spaces stop the excerpt, so if you have a post of 120 words and excerpt at 119 - but theere are 2 or more spaces between the 39 and 40th words, you see 40 words and then [...] |
Cool, thanks for looking into that.
|
1 Attachment(s)
Ok, I found out what was causing both errors and have fixed it (I hope) so download the attached file and renane your current functions.php to functions_orig.php and replace it with the attached ziped one (after unzipping it of course)
Attachment 504 NOTE: a WORD is any characters seperated by a space, so the text 'the quick brown fox' has 4 words. In an excerpt, HTML is normally stripped out so the text 'the <p> quick </p>brown fox' also has four words, but when you put things in the 'Don't strip these tags' things change. If you add <p> to the 'Don't strip these tags', the text 'the <p> quick </p>brown fox' now has six words even though you won't see them in the post. So the HTML that is not stripped will count in the excerpt length which may look like it it is returning too few words. |
Okay, I'm a little stumped. I am running v3.5.3 and I still can not get excerpts to show properly. I have seen some fixes, for previous versions, but either I am missing the one for this newest version or there isn't one. Anyone have ideas why this is happening on this version too?
I don't have anything mentioned in the "Don't strip these tags" field, although whether I leave that blank or have the default HTML Code:
<p> Thanks. P.S. The site I am working on is here http://www.presentationadvisors.com/blog1 |
Oh it works, but I need to control how much of a post shows. My client wants to show more than a few words, but each time to change the # of words I still end up with the same result. That is what I am coming up against, not being able to show more in the excerpt than what you currently see.
Yes, I do have the first post set to "full" and the others on the page are excerpts. Okay, wait that is weird. I just checked the site again, and now it is working. What the heck? I have not worked in the site again, since posting my issue, and it was not showing properly then. So weird, obviously I have entered the Twilight Zone. If it is working now then I guess I am all good. Thanks! |
Okay, now I see what is weird. Previously the system was set to show full posts (all posts), though it was not doing that (it was showing the first one as full, and the others as excerpts). Now that I went in, and changed it back to excerpts, it is apparent that it is not showing 300 words (which is what I have it set for).
Am I totally using excerpts wrong? I just don't get, no matter how many characters I ask it to show it always shows the same thing. Thanks, and sorry for the previous confusion. |
Yeah, that is the problem. I have it set for 300 words, but it always cuts off after the 16. Is there another setting in WP, where excerpts are being dictated other than the Atahualpa Theme Options?
Nope, no caching at all. Bare bones as far as active plugins right now. These were imported posts, that were brought over from Typepad, but the client did not add any of the manual "read more". I'll have to check on the automatic excerpts, cause I was not aware of those in Wordpress. Thanks, again, for the help and insight. |
Please copy and post the full contents of one of the posts. do the copy using the HTML editor and wrap it using the HTML icon above the reply area (it's next to the <> and PHP icons)
|
Thanks for the help. I actually was playing around yesterday, and did find that the client had excerpts filled in (in the post edit screen). This must have come over from Typepad, since he has not been editing the new site at all. Though, when I removed those I hoped the excerpts would jump start and show the first 300 words. Well, that didn't happen. Instead, using the second post on the blog as an example, the whole excerpt disappeared. Any new thoughts on why that is happening?
In the meantime, here is the HTML for the post. Although, I do now see a <more> tag....but again shouldn't I at least see the text that shows before that?: HTML Code:
I'm so excited to bring this to you. I came across this video just the other day when <a href="http://twitter.com/OliviaMitchell/status/27250047210" target="_blank">Olivia Mitchell tweeted</a> a <a href="http://www.timwasher.com/2010/10/when-powerpoint-attacks/" target="_blank">video of Tim Washer</a> avoiding a presentation disaster through the use of improv humor. That's a great video as well. |
Ugh. I knew there was a reason why I hate converting from one system to another. Removing the more tag, fixed the whole thing. Well, at least for that post. I am not going to go through each one and remove that tag. I assume there isn't an easier way to handle this - because it appears I need to remove the excerpts he might have typed for each post as well as the <more> tag.
Right? Once again, thanks for the help! I didn't get a chance last night to go through the code, but copy/pasting it made it shout out at me - and I finally saw the problem. :) |
well, there is a way. you could use phpMyAdmin and do an update and replace all excerpts with null, This would get rid of all of them
HTML Code:
update wp_posts set post_excerpt ='' |
All times are GMT -6. The time now is 01:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.