Title: Pageviews Plugin
Last modified: December 28, 2016

---

# Pageviews Plugin

 *  [jmschot](https://wordpress.org/support/users/jmschot/)
 * (@jmschot)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/)
 * Hi, i’m writing my own pageviews plugin, but i’ve got a problem. It all works,
   except one part, the part where it displays on the index page how many views 
   there have been. I’m posting the code which is going wrong:
    ` <?php /* Plugin
   Name: PPP (Pageviews Per Post) Plugin URI: http://schot.xs4all.nl/index.php?p
   =4 Description: Pageview counter for posts, automatic. My site is online, when
   i'm online ;) Version: .01b Author: jmschot Author URI: http://schot.xs4all.nl*/
   function views() { $count_id = $_GET['p']; if ($count_id == NULL) { global $id;
   $result = mysql_query(" select * from wp_count where count_id='".$id."'"); $r
   =mysql_fetch_array($result); echo $r[count]; return; } ... here follows the code
   where it displays the views at the post itself, like index.php?p=3, which does
   work ...  Does anybody see what i’m doing wrong?

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

 *  Thread Starter [jmschot](https://wordpress.org/support/users/jmschot/)
 * (@jmschot)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48654)
 * found the problem, i used the wrong row name … argh
 *  [MaxT](https://wordpress.org/support/users/maxt/)
 * (@maxt)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48667)
 * Pageview counter for posts… O.O
    I’m sorry, but what’s the reason to make your
   own plugin? Isn’t official feature provided by WP is good enough? Just wondering.
 *  [Ozh](https://wordpress.org/support/users/ozh/)
 * (@ozh)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48676)
 * only in alpha if I’m correct, that’s probably why
 *  [MaxT](https://wordpress.org/support/users/maxt/)
 * (@maxt)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48684)
 * Ah, I see…
 *  [Sushubh](https://wordpress.org/support/users/sushubh/)
 * (@sushubh)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48698)
 * WP dont have a page view counter :O)
    there is a hack… by laughing lizard
 *  Thread Starter [jmschot](https://wordpress.org/support/users/jmschot/)
 * (@jmschot)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48700)
 * Well, that just sucks. 😉
    It ready anyway and can be found here: [http://wordpress.org/support/10/4937](http://wordpress.org/support/10/4937)
 *  [MaxT](https://wordpress.org/support/users/maxt/)
 * (@maxt)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48702)
 * Now I understood why I didn’t understood meaning of this one from the first time…
   I have it allready on my site 😮
 *  Thread Starter [jmschot](https://wordpress.org/support/users/jmschot/)
 * (@jmschot)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48723)
 * I reallt don’t understand what you’re saying there… you now understood why you
   understood the meaning of this one … which one?
 *  [MaxT](https://wordpress.org/support/users/maxt/)
 * (@maxt)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48725)
 * of this thread…

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

The topic ‘Pageviews Plugin’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 4 participants
 * Last reply from: [MaxT](https://wordpress.org/support/users/maxt/)
 * Last activity: [22 years, 1 month ago](https://wordpress.org/support/topic/pageviews-plugin/#post-48725)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
