• .
  • .
  • .
  • .

Editing The Number Of Words For The Excerpt in WordPress

Posted in WordPress | Posted on Date 11-08-2011 | Comments 3 Comments
Tags: , ,

wordpress-tricks

Some people might think it is the number of lines you have to define to edit how long or short your excerpt in your WordPress article. It is not. It is defined by how many words. WordPress by default picks the first 55 words as your excerpt. However, if you wish to edit to make it shorter or longer:

Please note, this way changes the core files and upgrades will only change it back. (Thanks Mike Little!)

1. Go to your wp-includes folder and find the formatting.php file

2. Look for the group of code like

/**
* Generates an excerpt from the content, if needed.
*
* The excerpt word amount will be 55 words and if the amount is greater than
* that, then the string '[...]' will be appended to the excerpt. If the string
* is less than 55 words, then the content will be returned as is.
*
* @since 1.5.0
*
* @param string $text The exerpt. If set to empty an excerpt is generated.
* @return string The excerpt.
*/
function wp_trim_excerpt($text) {
if ( '' == $text ) {
$text = get_the_content('');
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$text = strip_tags($text);
$excerpt_length = apply_filters('excerpt_length', 55);
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words) > $excerpt_length) {
array_pop($words);
array_push($words, '[...]');
$text = implode(' ', $words);
}
}
return $text;
}

3. If you see $excerpt_length = apply_filters(‘excerpt_length’, 55); change the text length which by default is 55 to the number of words you prefer.

—–

Mike Little suggests a better way with a lot less code and hassle involved! :)

Apply a filter! Alright the above code hints to you that you are applying a filter, so instead, you can leave the core files and formatting.php file alone. Also, applying a filter to your theme’s functions.php file will prevent overwriting each time you go through a WordPress upgrade.

Instead:

1. Go to your functions.php of your theme template and add the following


add_filter('excerpt_length', 'my_excerpt_length');
function my_excerpt_length($len) { return 75; }

Now your excerpts will be the length you want!

Big News! Blondish.net Will Be Carrying WordPress Topics Once Again

Posted in WordPress | Posted on Date 11-05-2011 | Comments 5 Comments
Tags: ,

extraextra-newspaper
For over two years, Blondish.net has been without WordPress specific topics. After careful deliberation over stats like traffic, keywords, and my brand in general, I decided to close WPAddict.net and move all the articles back over. I also consulted with a couple dear friends who are great marketing strategists before making this decision. What sparked this was that I kept ranking high in WordPress topics, even though my posts were not primarily WordPress based on Blondish.net. I do mention WordPress, but in regards to blogging or applying specific tools. I even had old posts that I removed and put up Read More →

Klout’s New Algorithm Not A Winner With Fans

Posted in News | Posted on Date 10-27-2011 | Comments 23 Comments
Tags: , , , ,

klout
Klout, an Izea property that measures how much reach and influence a person has over several social network platforms recently rolled out a new algorithm. Along with this, an influx of angry users due to their major drops in their Klout scores. According to Klout, they score individuals based on three areas: True Reach, Amplification, and Network Impact. Together these mean that Klout measures how many people you really are reaching, and if you are influencing them to actually do something. For example, doing something could mean retweeting a link or your words, or even talking with you. According to Read More →

Interview With An Influential Blogger: Gail Gardner

Posted in News | Posted on Date 10-27-2011 | Comments 13 Comments
Tags: , ,

influentialbloggerseries
I happened upon Gail Gardner of Growmap.com through my connected with Kimberly Castleberry and Kristi Hines, and noticed how she was interacting and putting out great content to her followers. I knew with the unveiling of GrowMap Anti-Spam Plugin, I wanted to interview Gail. The biggest thing that set her apart from other bloggers, in my opinion was her thorough coverage on topics that other bloggers would timidly touch on. Gail focuses on her brand, rather than herself and for a reason most bloggers might shut shop for, and she does discuss valid reasons in one of the questions below Read More →

A Guide to Blogging: Writing Product Reviews

Posted in Blogging | Posted on Date 10-26-2011 | Comments 29 Comments
Tags: , , ,

good-bad-writer
Writing product reviews is not always easy. It does involve actually having used the product, being able to describe the item or service, and a lot of times, you may have to make sure you have a disclosure just in case you get compensation for your review. Here is a guide to writing product reviews on your blog. Set up a Site Disclosure Policy You should have a site wide disclosure and also disclose on the posts you are receiving compensation for. In the United States you are required to disclose paid endorsements. Some of the paid to blog services Read More →

Self Hosted Blogs Versus Free Hosted Blogs: Pros, Cons, And In Between

Posted in Blogging | Posted on Date 10-24-2011 | Comments 19 Comments
Tags: , , ,

blog
Everyone has started a website in some manner. Some started on a free host and others invested right away in their own hosting. However, what is best for you? This article will go over hosted blogs versus free hosted blogs and cover the pros, cons, and in between. What is a free hosted blog? A free hosted blog is one that you sign up with a service like WordPress.com or even Google Blogger and they automatically put together an account you can start blogging with right away. Of course, they are free, but you have to agree to their terms Read More →

Review: Pixlr – Free Online Image Editor

Posted in News | Posted on Date 10-24-2011 | Comments 5 Comments
Tags: , , , ,

pixlr
I am always looking for different tools out there for bloggers who have at least a minimal knowledge of putting together simple graphics. I stumbled upon Pixlr, which is a free online image editor. Now, the site looks promising at a first glance and has an editor that you can use without having an account. The setup looks clean and has plenty of options, except for the fact that I could not use vector imaging to create. (You can right click and open the image in a new window to see the full size of the image.) This program even Read More →

Show Me The Blog Conference 2011: Win CommentLuv Premium for Free

Posted in News | Posted on Date 10-21-2011 | Comments 3 Comments
Tags: , , ,

CommentLuv125x125StaticS2AAA
Andy Bailey has generously given me on his behalf to giveaway 2 licensed versions of CommentLuv Premium for Free at the Show Me The Blog Conference 2011. Blondish.net currently uses CommentLuv Premium and it has been a dream. It has 8 plugins in one to combat spamming, amp up the Commentluv system, KeywordLuv and even Twitterlink ID. Previously I was using Intense Debate and I have noticed a decline in commenting due to the options to log into Twitter and Facebook to comment. I have done away with Intense Debate (even nearly planned a funeral for it), and turned to Read More →