04 February 2013

How to Add Couch Mode to WordPress?



You might’ve come across several blogs where advertisements dominate the content. This makes the user feel irritated and obviously he moves on to another website. What if he was given an option to read the web pages in a clutter-free environment? Yes, I recently came across several of such blogs wherein they’ve provided an additional option to read the posts without any advertisements and unwanted widgets. If you wanted to implement it on your blog, do follow the below steps.


read-content-couch-mode


How to Implement Couch Mode Feature on WordPress Blogs?




  1. Go to your WordPress dashboard and create a new page with the name “Reader Friendly” (something similar). You can leave the body empty and click “Publish”.



  2. Next, using FileZilla or any FTP software, open your .htaccess file and add the following code at the top.


    RewriteRule ^read/([0-9]+)/?$ /read/?u=$1 [QSA,L]





  3. Now, copy-paste the text in the page-read.php.txt file into a notepad file and save it as “page-read.php” (select save as type: “all files’’)



  4. Next, copy this file into your WordPress theme folder (currently active theme).



  5. From your WordPress dashboard, go to Appearance > Editor and open your single.php file.



  6. Paste the following line of code wherever you required to appear in your post. I prefer adding this below your post title and click “Save”.


    <a href=”/read/<?php the_ID(); ?>/”>Read story without the clutter</a>





That’s it! From now on, your users will have the choice to read lengthy posts in the couch mode. This increases the user interaction very much.


Couch Mode Full Credits: @labnol



No comments:

Post a Comment