WP-Postviews plugin not working. How to fix it?

No picture

About this article: Posted in: Learned along the way
By: Blockcoder ( Admin ) / 04.10.2011
Stats: 8 responses / Views: 1,464
Tags: ,

What is the problem

Hi, I wanted to share this ( easy and short ) tutorial with everybody, because it was a very frustrating problem. I fought with it for weeks because I didn’t find the correct answer how to get the postviews number displayed right. My problem was that although my wp-postviews settings were correct, it was only showing the number 0 all the time. Well, I got frustrated with that.

I thought it was easy

My settings really were what wp-postviews install guide showed me.

Postviews install guide step 1

The install guide says that this ” if( function_exists(‘the_views’) ) { the_views(); } ” must be included your main loop. Well I did it.

Next I checked my settings in wordpress admin panel:

Postviews install guide part 2

I left them as they were when I installed it. I didn’t make any changes.

So, everything was right, but it didn’t work. When I refreshed my page, number 0 were there everytime.

Great battle against postviews problem 0

Okay, I fought and fought and fought.. but nothing happened. The 0 seemed to be an undefeatable boss. I searched everywhere, the official install guide, forums, wordpress forums, tried by myself something clever.. AND THEN — some guy in some forums ( can’t remember anymore where or who ) said that put this line of code into your header tag: “wp_head();” and the wp-postviews plugin should work.

I wrote it in to my header tag and refreshed — and IT WAS working! Cool. All thanks to that nameless guy in somewhere!

So, the answer were wp_head(); tag

I wrote it like this:

Wordpress postviews plugin install guide part 3

I really don’t know what it does, but when I look my source code after including this wp_head(); it prints out some meta descriptions and other information of this webpage.

Postviews install guide part 4

Or I don’t also know why the wp-postviews plugin is working after that. Maybe it’s because the plugin is using that information and I didn’t have it in my custom theme. But the thing what I’m trying to say is: please write “wp_head();” into your header tag and it will work!

Thanks, I’m terminating my frustration with you guys. Hope it helps tough! :)

There are 8 responses on this post

Blockcoder ( Admin )
Hi Sorin, You should write the wp_head(); within the head -tags in your html -code! Then, it should work :)
where should I put this code wp_head(); ?
Thanks a lot!
André Buzzo
Man. Thank you. You really gave me a great answer. Regards. Keep the good work.
Now it works! Great post, you've solved a boring problem! I've still noticed some strage behaviours (post counts are not the same in every page), anyway counts are not stuck anymore! Thanx u again! ;)
BlueHost Coupon
I truly wanted to write down a quick remark to thank you for these pleasant secrets you are showing at this website. My time-consuming internet lookup has at the end been rewarded with really good know-how to go over with my contacts. I ‘d express that we readers actually are undoubtedly blessed to dwell in a fantastic community with many outstanding individuals with insightful concepts. I feel rather grateful to have used the web site and look forward to tons of more cool times reading here. Thank you once more for all the details.
Iphone 5
he web site was how do i say it… relevant, finally something that helped me. Many thanks
how many calories should i eat
Good day I am so delighted I found your web site, I really found you by mistake, while I was researching on Google for something else, Nonetheless I am here now and would just like to say cheers for a fantastic post and a all round enjoyable blog (I also love the theme/design), I don’t have time to read it all at the moment but I have book-marked it and also added your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the awesome work

Leave a Reply

Your email address will not be published. Required fields are marked *


9,579 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>