Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   Excerpts Not Working When 'Read More' Option is Used (http://forum.bytesforall.com/showthread.php?t=12016)

Sundrop Jan 5, 2011 02:11 AM

Excerpts Not Working When 'Read More' Option is Used
 
This is an odd problem that has just started showing up at my site as far as I can tell.

Here is my issue:
  • I have my seven most recent posts shown without excerpts.
  • Occasionally those run long enough that I break up a post by inserting "Read more" in the post.
  • Posts beyond the seven most recent ones are expected to show excerpts only.
  • The issue is that posts with the "read more" tag are not being excerpted like they should. I'm getting all of the post shown up to the point of the "Read more" tag. It's as if the expectation that an excerpt should be showed is ignored if there is a "Read more" tag - except it *is* showing a thumbnail. The thumbnail is not so helpful since it's duplicating the image before the "read more" tag.

I haven't seen this before. The only change I can recall making in recent weeks is that I upgraded Atahualpa to 3.5.3 and Wordpress to 3.0.3.

Thoughts? Suggestions?

juggledad Jan 5, 2011 04:27 AM

This is a case when there are too many ways to do the same thing. If you want an excerpt you can
- hand craft it
- manually add the <!--more-->> or
- let it be automatically created

Excerpts are the messiest thing to figure out -
what do you do if you have an automatic excerpt set to 55 and there is a <!--more--> at word 45?
what if there is a manual excerpt and a <!--more--> at word 45?
since all html is stripped from an excerpt by default how do you handle thumbnails?

There were some bugs in the prior code handling the edge cases. Currently the way it works is this
1) if there is a manual excerpt (hand crafted in the post) use that
2) if there is a <!--more--> use that
3) other wise auto generate the excerpt

Sundrop Jan 5, 2011 09:19 AM

So... if I understand you correctly... an excerpt will not be auto-generated if there is a manual "!--more--" tag inserted into the post.

This is new, in my understanding.

It's also frustrating, as I have thousands of posts (but not all by any stretch) that have the "!--more--" tag and that had previously had excerpts automatically generated. (For example, a post might have six paragraphs, and I'd want a "read more" link after three paragraphs. But when the post is shown on pages with other excerpted posts, I'd want a shorter excerpt for it also, not the three long paragraphs.) Now those thousands of posts are handled differently than they were before.

Thank you for helping me with my understanding.

I would be very glad for you to straighten me out if I misunderstand something.

juggledad Jan 5, 2011 01:23 PM

1 Attachment(s)
try this, I made a change to functions.php
rename the current functions.php to functions.353
Unzip the version attached
upload this version and test it and let me know if it works for you.
Attachment 994

Sundrop Jan 6, 2011 04:02 PM

Thank you. I will try it.


All times are GMT -6. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.