Posts Tagged ‘Excerpt’

v1.0.0 – Return a whole sentence with Get Better Excerpt

Welcome to my blog, please feel free to subscribe to my RSS feed, join me on Twitter or leave a comment.

= Return a whole sentence =
If you would like to return whole sentences rather than words, you can control the number of sentences to return:
get_better_excerpt(’sentence=1′);

I’ve upgraded my Get Better Excerpt plugin this morning to include a cool new feature, now you can retrieve a complete sentence instead of a series of words for your WordPress excerpts.

To return a single sentence:

get_better_excerpt(’sentence=1′);

For two sentences:

get_better_excerpt(’sentence=2′);

Of course, you can also combine this with other options:

get_better_excerpt(’sentence=2&link=true’);

WordPress Plugins & Themes

This week was a pretty productive week for updating and editing my WordPress related content here on the website, I updated most of the plugins and a few of the themes to modernize them. In a few cases minor bug fixes but mostly just ensuring they are ready for the new WordPress 2.8 release.

Theme Updates

You can always find links to all my themes in the theme directory, but here’s a run down of some of the changes:

Great Chefs Great Restaurant Web Theme
New! This is a completely new theme for my website and hopefully will be my first contribution to the WordPress directory. It’s designed for restaurant owners and chefs who are looking for a perfect theme for their restaurant but could easily be used for any variety of websites.

One Night in Paris
I recently updated the One Night in Paris theme and redid a significant amount of the front end including a redesign of the index.php file.

Community Friendly Theme
Minor changes to the code designed to make the theme more compatible with 2.8

Plugin Updates

Get Image from Post, a Free WordPress Plugin
New! This is a simple plugin which allows users to return an image from the related post.

Get Better Excerpt Plugin for WordPress
New! The Get Better Excerpt plugin works almost identical to the built in get_the_excerpt() and the_excerpt() functions except it returns whole words.

You can of course see all my plugins in my plugin directory on thisismyurl.com or by visiting the official WordPress website at http://wordpress.org/extend/plugins/profile/christopherross where I sincerely hope you’ll download and vote for my plugins.

For a bit of shameless self promotion today, I’d love to remind everybody that I’m available to develop custom WordPress themes and plugins for your organizations. Sponsoring a free theme giveaway is an easy way to dramatically increase links to your website and give back to the community.

Get Better Excerpt Plugin for WordPress

The Get Better Excerpt plugin works almost identical to the built in get_the_excerpt() and the_excerpt() functions except it returns whole words instead of cutting off the excerpt as the existing function does.

The plugin allows you to display the excerpt or read it to a variable, select the number of words to return and choose if you want the plugin to skip the built in excerpt and read from the content instead.

As with all my plugins, this is the code I use here on this is my url to return excerpts throughout the website. You’re free to download it.

Frequently Asked Questions

= How do I display the results? =
Insert the following code into your WordPress theme files: 
= General results =
ithout passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.
 get_better_excerpt();
= Altering the before and after values =
By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:
 get_better_excerpt(‘before=<p>&after=</p>’);
= Adding a Link = 
If you’d like to link to the post (remember it’s not live yet) you can do so by calling:
 get_better_excerpt(‘link=true’); 
= How many words? = 
You can specify the number of words returned using the option:
 get_better_excerpt(‘words=20′); 
 
 = Skip the excerpt? = 
If you would like to load the content directly, skipping the entered excerpt:
 get_better_excerpt(’skipexcerpt=true’); 
 = Include a trailing character? = 
By default the plugin includes a … after the excerpt, you can remove it or change it by altering:
 get_better_excerpt(‘trail=’); 
= Echo vs. Return =
Finally, if you’d like to copy the results into a variable you can return the results as follows:
 get_better_excerpt(’show=false’);