Support » Fixing WordPress » 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:

    Plugin Name: PPP (Pageviews Per Post)
    Plugin URI:
    Description: Pageview counter for posts, automatic. My site is online, when i'm online ;)
    Version: .01b
    Author: jmschot
    Author URI:
    function views() {
    $count_id = $_GET['p'];
    if ($count_id == NULL) {
    global $id;
    $result = mysql_query("
    select *
    from wp_count
    where count_id='".$id."'");
    echo $r[count];
    ... 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)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Pageviews Plugin’ is closed to new replies.