WordPress is one of the most widely used and fast growing content management system (CMS) worldwide, if you’re wondering what a CMS is, then it’s a framework that allows anyone to create online presence without any prior knowledge about programming. Many organizations, institutes and even individuals relies on WordPress as a backbone for their websites.
Sometimes you as a webmaster would like to control and limit how many words will be displayed in your excerpt, and WordPress can help you do so, of course you can always use a plugin to help you do that but we all know the drawbacks of WordPress plugins and that’s why we’re not going use a plugin in this tutorial.
This post will present and step by step tutorial on how to control and limit how many words will be displayed in your excerpt without any plugins just by copying and pasting the code in this post. But before starting you should backup your files in case anything went wrong.
Step One: Go to your website and log into your WordPress dashboard (www.example.com/wp-admin) and enter your credentials, then enter the dashboard.
Step Two: In your dashboard enter your Appearance menu.
Step Three: In the Appearance menu, go to the “Editor” tab.
Step Four: Open the function.php file at the right hand side of the screen and copy and paste the following code in it.
Step Five: Open the loop.php file at the right hand side of the screen and copy and paste the following code in it.
Now, you’ve successfully modified the original excerpt with your newly modified excerpt.