Get Content Limit?

Limiting the content to a number of words is a little tricky. Limiting the number of characters is much easier to do and is built in to WordPress already.

You can use the the_excerpt() and get_the_excerpt() functions to limit the number of characters in the beginning of the post content. The example in the first link, shows how to change the number of characters chosen.

add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
/**
 * Change the excerpt length to 20 characters.
 */
function custom_excerpt_length() {
    return 20;
}

You can also specify an exact excerpt in a post. This allows you to create a custom excerpt that describes the post better than the first few characters.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)