Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Steve Truman

    (@a3rev)

    Hello Guy

    I am not sure what you mean by this

    “I have lost all my former stats.”

    WordPress core does not record page views? What was making the stats on your site – another plugin? If so which one? and what happened? Are you saying you installed Page View Count and it zeroed out all that plugins existing stats?

    Thread Starter GuyOlinga

    (@guyolinga)

    Hello Steve,

    As my understanding of the WordPress counter system is now better, my need can now be more precise.

    I have installed the plugin “WordPress Stats View Counter” that makes the Jetpack post views counter available to me (every 3 hours) in a field called ‘views’ in the post_meta table.

    This is exactly what I needed since the Jetpack stats are the more accurate for me. All other counter plugins will create their own counter field and start counting from 0.

    Yet my only challenge is to display that post_meta(views) just after the text for all my posts and pages.

    The “WordPress Stats View Counter” developer said I should use this command:
    get_post_meta( $post->ID, ‘views’, true );

    But I don’t quite know where I have to insert that command in my Linepress theme powered by Gabfire.

    Using the above command, my expectation is to show something like this below every post/page, just after the text:

    “lu 72 fois”

    Whereby 72 stands for the value of ‘views’ in the post_meta file for the given post ID.

    I have asked the question to Gabfire support with no answer yet.
    Any help will be highly appreciated

    Thanks
    Guy

    Thread Starter GuyOlinga

    (@guyolinga)

    This is the answer fron Gabfire support

    open single.php and page.php
    Paste this
    $views = get_post_meta( $post->ID, ‘views’, true );
    echo “lu $views fois”;

    right after the_content();

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display real WordPress Stats’ is closed to new replies.