Variable Length Excerpt for WordPress

If you need to change the default excerpt length you can do that through the use of the excerpt_length filter.

If you need to be able to get varying length excerpts then you can add a custom function to your theme’s functions.php file like this:

// custom length excerpt as long as inside a loop
function custom_length_excerpt($word_count_limit) {
	echo wp_trim_words(get_the_content(), $word_count_limit);
}

Resources:
http://stackoverflow.com/questions/4082662/multiple-excerpt-lengths-in-wordpress
http://codex.wordpress.org/Function_Reference/wp_trim_words
http://codex.wordpress.org/Function_Reference/get_the_content

WordPress Custom Post Type With Tags

I wanted to create a WordPress custom post type but have it be just like a regular blog post with all the same basic functionality. I was able to accomplish this by editing my theme’s functions and adding a hook into tho init event using the register_post_type function. Here is what it ended up looking like:

add_action( 'init', 'create_post_type' );
function create_post_type() {
    register_post_type( 'review',
        array(
            'labels' => array(
                'name' => __( 'Reviews' ),
                'singular_name' => __( 'Review' )
            ),
            'taxonomies' => array( 'post_tag' ),
            'public' => true,
            'has_archive' => true,
            'supports' => array(
                'title',
                'editor',
                'author',
                'thumbnail',
                'custom-fields',
                'comments',
                'revisions'
            )
        )
    );
}

This is what the end result looks like. Just what I wanted.

 

Resources

https://codex.wordpress.org/Function_Reference/register_post_type

https://codex.wordpress.org/Glossary#Post_Type

Best Countdown for Blog

This is the best free countdown widget that I have seen yet that is easy to configure and put on any blog. Looks good, easy to insert, minimal ads, and its FREE! I don’t use these contdown widgets on my blog very often but sometimes they are really fun to have. Make yours at http://www.countdownr.com/

countdown widget
countdown widget

Would work well on blogspot (blogger), WordPress, TypePad, and many more.