WordPress.org

Ready to get started?Download WordPress

Forums

Popular This Week widget not work (3 posts)

  1. iLm@N
    Member
    Posted 5 years ago #

    Hi Chris.. thank you for the plugin..
    this is what I was looking for: popularity plugin that not track a whole posts, but just last week..

    I'm using your 1.0 version and WordPress 2.7.1

    I got a problem with the widget. I added the widget, but it not shown in the page.. There's only "Popular This Week" title, but no post at the bottom of the title..

    I didn't try using ptw_countview() in my themes, because I want it to be a widget.. I wonder what's the problem..

    Thanks..

    http://wordpress.org/extend/plugins/popular-this-week/

  2. chrisnorthwood
    Member
    Posted 5 years ago #

    I didn't try using ptw_countview() in my themes, because I want it to be a widget.. I wonder what's the problem..

    That's the problem. Nowhere in your theme are you counting the views. It's not perfect, and is something I will address in a future version, but you *must* put that ptw_countview() in there.

    Just to clarify, ptw_countview() does not display the widget, it simply counts the current page as a view. (In my own blog, I only want posts viewed in single.php to count as a view, not views on the index, archive pages, etc, which is why I implemented the functionality as it is)

  3. iLm@N
    Member
    Posted 5 years ago #

    oh, so I missed that point! I thought the ptw_countview() display the "popular this week" in themes.. but actually it counts the post..

    when I posted this item, I don't see this procedure in http://wordpress.org/extend/plugins/popular-this-week/installation/

    There is one additional change. In your theme, open the single.php file and add <?php if (function_exists('ptw_countview')) ptw_countview(); ?> inside the loop. If you want your post views to count when seen elsewhere (not just on their own), insert that code everywhere else too.

    thank you very much for the help! and sorry for this misunderstanding
    :D

Topic Closed

This topic has been closed to new replies.

About this Topic