Jump to content

How do I limit the number of words displayed?


only1perky

Recommended Posts

Hi guys, I've run into a problem which I just cannot figure out.

I have a field which users type a description of their business in. This works fine.

On my home page I display a featured business which will show their name, email and description etc.

 

What I need help doing is limiting how many words from the description are displayed on the home page.

For example if the description is only 20 words it would display them all but If there are 200 words it would display the first

20 then ...

 

Can anyone supply the code for me to achieve this?

Any help would be greatly appreciated.

 

Cheers in advance. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.