Ondersteuning » Plugin vragen » wp-postviews does viewcount 2 instead of 1

  • Hi all,

    I’m using the wp-postviews plugin to see which post have been viewed the most.

    My setup is as follows:

    – posts that should appear on the blog, have their own category
    – I have a blog template called blog.php and Template Name: Blog page template
    – I have a loop-blog.php file, with the actual content of that page
    – I have edited single.php as follows:

    $postcategory = get_the_category( $post->ID );
    if($postcategory[0]->slug == 'blogitem'){
    				get_template_part( 'loop-blog' );
    			 }
    			 else {
    				 get_template_part( 'loop', 'single' );
    			 }

    I’ve also read that the wp_head(); can cause this problem. I’ve removed if from so many places, it’s screws up my design 🙂

    anyway: it’s always the latest post that gets updated…
    for example

    post 1 = 1 view
    post 2 = 2 views

    If I view post 1=> both of them +1
    if I view post 2> only post 2 gets updated…

    Anyone any ideas??

    Kind regards

    Mario

1 reactie aan het bekijken (van in totaal 1)
  • Thread starter mariovde

    (@mariovde)

    Update: It seems that when I have 3 posts: the following occurs;

    – viewing post 1: post 1 and 2 get updated
    – viewing post 2: post 2 gets updated
    – viewing post 3: post 3 gets updated

    so it’s only when watching the first made post, it updates the second as well…

1 reactie aan het bekijken (van in totaal 1)
  • Het onderwerp ‘wp-postviews does viewcount 2 instead of 1’ is gesloten voor nieuwe reacties.