Shortening Excerpt or Content

Cut the excerptSometimes, our web will looks bad, because the content that shown at the main page were too long. Even you are change that content into excerpt “the_exceprt()” it will still too long, and still looks bad. The idea is you only need to show 100 Characters only, is this possible?

Actually, WordPress already have built in script to do this trick. To show only certain of character of our content. Lets see this example below :

How to Shortening the_excerpt

<?php echo substr(get_the_excerpt(),0,100); ?>

Descriptions :
- 0 : Start
- 100 : Ends
that sample above means, script will only show text from 0 until 100 chars. Its possible to show from 100th chars until 150 chars.
it will be like this
echo substr(get_the_excerpt(),110,150);

 

Got the point? Share it for everyone. If you need to know how to cut your title post, you can read it here.

Tags: , , ,

Facebook comments:

Leave a Reply

Your email address will not be published. Required fields are marked *


2 + = 7

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© AutoBlog Theme
CyberChimps
AutoBlog Theme located at Indonesia , Malang, East Java . Reviewed by 98 customers rated: 4.4 / 5

best drugstore where you can buy viagra buy viagra online canada No surgery is totally free of possible complications. Complications associated with penile implants include: Women who use the vaginal ring should not smoke. looking for viagra without prescription? canadian pharmacy viagra There are many different ways ED can be treated, including oral medications, sex therapy, penile injections, suppositories, vacuum pumps, and surgery. Each type of treatment has its own advantages and disadvantages. Talk to your doctor to determine the best treatment for you. A. It works for 70 to 80 percent of all men suffering from ED, with highest success rates in men with non-vascular causes of ED (psychogenic, hormonal, neurogenic). After undergoing a radical prostatectomy, some men experience pain and burning when injecting the medicine, (alprostadil). Only 1 to 5 percent of men have this reaction, but it's enough to prevent them from using the drug again. If you need viagra canadian pharmacy viagra The US-based Center for Medicine in the Public Interest estimates that the global sale of counterfeit drugs will reach $75 billion in 2010, a 92 per cent increase in five years.

Generic viagra 100mg » Online Drugstore