WordPress.org

Forums

WP-PostViews
[resolved] No Post Views? (6 posts)

  1. ablanchard23
    Member
    Posted 1 year ago #

    We updated to the latest version of WordPress (admittedly it has been a year since we last updated) and our posts that have gone live still have a Post Views of 0. All of our previous posts still have the count as it was before we updated our WordPress version. But it doesn't seem to be updating that number since we updated WordPress.

    Suggestions on how to fix this?

    http://wordpress.org/plugins/wp-postviews/

  2. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

    Site URL?

  3. ablanchard23
    Member
    Posted 1 year ago #

    Thanks for the quick response. It is here.

  4. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

    I see you are using W3TC so your view count will not be real time, You views did not count because the JS is not there in your theme. See http://wordpress.org/support/topic/ensure-your-theme-has-wp_head-and-wp_footer-2?replies=1

  5. ablanchard23
    Member
    Posted 1 year ago #

    It has been two days since our first post with 0 views was published. Would w3tc be that far behind real time?

    I actually checked that first. We do have both like so:

    <?php
    	/* We add some JavaScript to pages with the comment form
    	 * to support sites with threaded comments (when in use).
    	 */
    	if ( is_singular() && get_option( 'thread_comments' ) )
    		wp_enqueue_script( 'comment-reply' );
    
    	/* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.
    	 */
    	wp_head();
    ?>

    in the header.php and:

    <?php
    	/* Always have wp_footer() just before the closing </body>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to reference JavaScript files.
    	 */
    
    	wp_footer();
    ?>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    in the footer.php.

    Clearly our theme authors wanted to make sure it wasn't accidentally deleted.

    Thanks for your help. Do you have any other ideas?

  6. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

    Looks ok to me based on the snippet you pasted. But your site is missing the JS code generated by the plugin, might be due to the page caching. Try deleting all the cache?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic