All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: wp-postviews always print 0 the views of a post  (Read 689 times)

0 Members and 1 Guest are viewing this topic.

Offline qubolabs

  • Newbie
  • *
  • Posts: 4
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: QuboLabs
wp-postviews always print 0 the views of a post
« on: 10 January 2010, 00:04 »
Hello everybody, I've installed the wp-postviews on my wordpress blog, located at: http://www.qubolabs.com/it/blog

I've installed the WordPress 2.9 and the last version of the plug-in.

In the theme I've developed, I have a blog-post.php page for the single post posted in blog category where I have the follow code in the loop:

<div class="post" style="padding-top: 8px;">
   <div class="entry">
      <h1 style="padding-bottom: 5px;">
         <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
      </h1>
      <?php the_content(); ?>
      <?php if ( function_exists('the_views') ) { the_views(); } ?>
   </div>
</div>
<div class="comments-template">
   <?php comments_template(); ?>
</div>

My problem is that I've always see: 0 visualizzazioni ( 0 views, it's italian )

I've activated only this plugin.

Could someone help me about this issue?

Thanks in advance and sorry for my english,
Regards

QuboLabs

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: wp-postviews always print 0 the views of a post
« Reply #1 on: 10 January 2010, 08:29 »
is it like that on the default theme as well? If it is 0 post, there can be 2 reasons.

1. Your theme is missing <?php wp_head(); ?> in your header.php and hence the views is not counting
2. You have duplicated custom field called "views"

Is it like that on the default theme (untouched)
« Last Edit: 13 January 2010, 01:29 by GaMerZ »

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline qubolabs

  • Newbie
  • *
  • Posts: 4
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: QuboLabs
Re: wp-postviews always print 0 the views of a post
« Reply #2 on: 10 January 2010, 12:33 »
Thank you so much! It's working!

What exactly do wp_head() and how it involve you plugin?

Thank you!

Regards

QuboLabs

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: wp-postviews always print 0 the views of a post
« Reply #3 on: 10 January 2010, 13:19 »
To increment the view count of the post.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Glook

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: Video Game Photo theme
Re: wp-postviews always print 0 the views of a post
« Reply #4 on: 12 January 2010, 20:50 »
Hello!
Same problem for me after update plugin. Work fine earlier. I dont have <?php wp_header(); ?> in header.php of my theme.
BUT have this  <?php wp_head(); ?> What should i do?
WordPress 2.8.6. 
Thank you.

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: wp-postviews always print 0 the views of a post
« Reply #5 on: 13 January 2010, 01:30 »
<?php wp_head(); ?> is correct, I have corrected my typo.

Does it work on the default theme with no other plugins activated? Also in WP-Admin -> Settings -> PostViews, is it set to count Everyone?

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.