How Do I Create a Read More Read Less Button in WordPress?

Creating a Read More or Read Less button in WordPress is a breeze. All you need is a bit of CSS and a plugin.

To create a Read More or Read Less button, first add a style to your header.php file like this:

/**

* Header template for WordPress

*/

header {

padding: 0px;

margin: 0px;

}

Then, add the following code to your style.css file:

.read-more {

font-size: 1.5em;

margin-bottom: .5em;

Next, install the Read More Button plugin. Once it’s installed, activate the plugin and add the following code to your plugin’s functions.php file:

* Activate the Read More Button plugin

function activate_read_more_button(){

wp_enqueue_plugin(‘read-more-button’);

Finally, add the following code to your theme’s functions.php file:

* Enable the Read More Button

function read_more_button(){

if(!current_user_can(‘read_more’)){

activate_read_more_button();

That’s it! Now you can use the Read More or Read Less buttons on your blog.

Conclusion

Creating a Read More or Read Less button in WordPress is a breeze.

With this simple technique, you can add a simple way for your readers to increase or decrease the amount of text they see on your blog.