Support » Plugins » WordPress Statistics plugin fix/workaround for 1.5 strayhorn

  • This is a workaround for the WordPress Statistics plugin that was written for 1.2, but has a little bug under 1.5.

    After upgrading to 1.5, the “Post Categories Stats” section gives the following error:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
    SELECT category_nicename FROM wp_categories WHERE cat_ID=

    I did some researching and found out that the get_category_link function was changed to only take one parameter instead of
    three. The 1.5 version of the function accepts the category_id
    parameter. Thus, I changed the two references of:
    .get_category_link(false, $cat_id, $cat_nicename).

    to instead read:

    Everything now seems to display properly without any issues.

    Hope this helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Where do you put this:

    if (! empty($display_stats) ) {
    echo “
    else if (($posts & empty($display_stats)) ) : foreach ($posts as $post) : start_wp(); ?>

    in WP 1.5? How does it go around the new loop?


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Statistics plugin fix/workaround for 1.5 strayhorn’ is closed to new replies.