Title: Posts being viewed
Last modified: August 20, 2016

---

# Posts being viewed

 *  [D J](https://wordpress.org/support/users/wwwpornolatinonet/)
 * (@wwwpornolatinonet)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/posts-being-viewed/)
 * I am looking for a way to list posts being viewed but I can’t find anything online.
 * Is it even possible? I’ve seen some websites that have these loops, “What other
   readers are currently reading”.
 * I’m using the following loop to list random set of videos
 *     ```
       <?php
             if ( is_home() ){
             $cat = get_query_var( 'cat' );
             query_posts(array('orderby' => 'rand', 'showposts' => 10, 'cat'=>$cat));
             }
             while (have_posts()) : the_post();
         ?>
       ```
   
 * How can I show posts being viewed? anyone

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [jasonmartin55](https://wordpress.org/support/users/jasonmartin55/)
 * (@jasonmartin55)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/posts-being-viewed/#post-3486100)
 * you mean list them as top posts being viewed? There is a plugin for that if you
   search the plugins.
 * If you mean just to show views on each post, not sure.
 *  Thread Starter [D J](https://wordpress.org/support/users/wwwpornolatinonet/)
 * (@wwwpornolatinonet)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/posts-being-viewed/#post-3486103)
 * Hi, I need a loop in order to display the posts being viewed currently or read
   sitewide
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/posts-being-viewed/#post-3486116)
 * Perhaps you can store post titles as [transients](http://codex.wordpress.org/Transients_API)
   as each post template is served. Then where ever you want to display this info,
   just retrieve the transient values. The tricky part will be how to handle multiple
   currently read posts without overwriting the previous entry. Approaches involving
   arrays or multiple transient “slots” come to mind.
 *  Thread Starter [D J](https://wordpress.org/support/users/wwwpornolatinonet/)
 * (@wwwpornolatinonet)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/posts-being-viewed/#post-3486117)
 * That sounds complicated lol, I guess the other option would be to use a meta 
   key and store timestamp as a value and create a loop within a time range of say
   1 minute.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Posts being viewed’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [viewed](https://wordpress.org/support/topic-tag/viewed/)
 * [views](https://wordpress.org/support/topic-tag/views/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 3 participants
 * Last reply from: [D J](https://wordpress.org/support/users/wwwpornolatinonet/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/posts-being-viewed/#post-3486117)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
