Support » Fixing WordPress » WP is auto-loading the next post (Clueless newbie reeeaaally sweating)

  • Hi there,

    I’m very new to WP and am learning bits as needed purely to achieve the result we want. Hardly ideal but there you go. I’ve hardly done anything outside of Yii for years.

    With that in mind (and I HAVE searched but I guess for the wrong terms), can anybody tell me why WP is loading the next post in the current category? I don’t appear to have any caching plugins installed.

    Right after wp_header calls wp_load I’ve put this:

    $query = "INSERT INTO views (page) VALUES ('{$_SERVER['REQUEST_URI']}')";
    echo(mysql_query($query)) ? '' : 'nay';

    Which is obviously a table I made myself.

    Say I’m looking at “buying and selling…”, I get the following in my table:


    The second URI is the next post with “publish” set in the database.

    Why is this a problem? Because I’ve written a plugin/function/whatever to record hits to a post for a little “most read” menu. As you can imagine, the problem I describe records views for the second page too.

    Any help really appreciated. I just can’t figure out why WP seems to be pre-loading the next post, behind the scenes.

    Sorry if this is well-known and covered elsewhere, I think I don’t know the right terms to search for!


  • The topic ‘WP is auto-loading the next post (Clueless newbie reeeaaally sweating)’ is closed to new replies.