BLOG

“I still suggest you call
this page 42Lab.
Works for both of us!”
- Joey

WordPress 101: Tips, Tricks & Hacks

WordPress is an absolute powerhouse when it comes to managing content on a website. The reason behind WordPress’s unparalleled ability to as a robust Content Management System is its wide variety of features and functionality on offers. 

The sheer amount of convenience WordPress offers developers and website owners puts it’s leagues ahead of its competition. One fundamental aspect of this convenience that WordPress offers is the modularity of its themes. It doesn’t matter whether you are an experienced website developer or a newbie, websites that are run on WordPress are equipped with themes that can accommodate any skill level.  

Now this customizable modularity of WordPress themes comes at a cost. That cost being the fact that many features are pre-defined. Therefore to truly create a WordPress website that reflects your brand, you need to edit quite a lot of default settings. 

One such setting that you need to toggle on your WordPress theme is the permitted word-limit for web-page excerpts. Web-page excerpts are essential to showcase & archive content on your WordPress website. 

How To Change The Length Of Excerpts

By default, WordPress provides you with only 55 words for your content post excerpts. Now it must be understood that the word-limit of 55 words isn’t short. But it is also true that 55 words aren’t necessarily enough. 

Therefore, it is only natural for a developer or website owner to want to increase the word-limit on web-page excerpts. The ones that want to do this on their WordPress website need not worry, as we have tailor-made a hack tailor-made just for your needs. The below steps detail the hack:                 

Step 1 – To increase the word-limit on the web-page excerpts you need to add the following code to your functions file: 

function custom_excerpt_length( $length ) {

return 20;

}

add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

Step 2 – Save your functions file with the updated changes. 

42 works

Why do Market Leaders rely on Social Listening?

Read Blog

42Works announces COVID-19 relief measures for all its team members

Read Policy
42 works
Get 42Works Blog updates in your Inbox!

    Virginia United States 3.236.13.53 https://42works.net/change-length-of-excerpts-in-wordpress/