Jump to content
Sign in to follow this  
cvandyck

How to vary amount of text seen on Posts

Recommended Posts

cvandyck

The amount of text visible (before hitting the "more info" button seems to vary from post to post so it is difficult to have a common box size for them. How do I set the number of words/letters displayed on the Posts page for abbreviated posts?

Share this post


Link to post
Share on other sites
catrina
The excerpt length can be controlled using this code (added to the functions.php file in PlatformBase): http://codex.wordpress.org/Function_Reference/the_excerpt#Control_Excerpt_Length_using_Filters

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Jenny
The section that says "Control Excerpt Length using Filters" shows the code [code]return 20;[/code] where 20 is the number of words.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
cvandyck
Where is this section .. and do I amend it .. ie.. CSS? and where?

Share this post


Link to post
Share on other sites
Rob
If you read that link provided, you'll see it specifies the file to which you edit the length under "Source file". Keep in mind too, that setting any number of words will still make the physical length different for each post. For example. if you use 20 words in each post, and there are lots of words like "if, and, but, with, for... " compared to words like "extraneous, contumacious, naturalistically"... etc. your excerpt will still be variable. Some post excerpt plugins will actually limit the length of the excerpt by characters. So, no matter the word length, you would get just the number of characters specified... let's say 200. No excerpt could exceed that figure, giving you more even and balanced excerpt lengths. The drawback there is once you reach the set number, your word could cut off after just one or two letters, followed by "...". Either method has its drawbacks. Personally, my basic rule of thumb is to use the first sentence only and leave it at that. Any good journalism teacher will tell you the first sentence should lay out the premise of the entire article. It's a golden rule that's worked for me for several years.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×