Connect with us

WP Stuff

Post Recommendations Based on Time Spent WordPress Plugin

We all would love to keep our visitors on our website for longer and reduce our bounce rate. One way to do is by showing posts to people who spend a lot of time reading your content already. Based on my research, there is currently no plugin that offers such functionality. With a little bit of JavaScript and PHP, you can write your own code.

🛠️ Divi Builder drag & drop page builder for WP

The PHP function queries your posts for related posts based on shared categories or tags. You are going to need a JavaScript function that sends an AJAX request to get related posts after a certain period of time.

For your recommended posts, you will need to add a DIV with “time-based-recommendations-placeholder” id. Yet another simple way to reduce bounce rate on your site. How would you improve this code?

Continue Reading
You may want to check out:
*some of our articles and lists include affiliate links to fund our operations (e.g. Amazon, Elegant Themes, Envato). Please read our disclaimer on how we fund Exxponent.
You may also like...
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in WP Stuff

To Top