Forums

WordPress Popular Posts
Manually editing counter (5 posts)

  1. turnkey13
    Member
    Posted 6 months ago #

    hello,

    probably the most efficient popular plugin.

    How can I add extra static number to post stat while showing them, I don't want to show low stats, I mean I would like start counter from certain number like 30 for example :)

    thanks..

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. gerzok
    Member
    Posted 5 months ago #

    I need the same, please!!!

  3. turnkey13
    Member
    Posted 5 months ago #

    I edited the output like below, and it works..

    <?php if (function_exists('wpp_get_views')) {

    $var1 = 100;
    $var2 = 1000;

    $views = wpp_get_views( get_the_ID() );

    if ($views <= 100)
    {
    $viewsx1 = $var1 + $views ;
    echo $viewsx1;
    }
    else
    {
    $viewsx2 = $var2 + $views ;
    echo $viewsx2;
    }

    ?>

  4. jpanizzoli
    Member
    Posted 3 months ago #

    Where did you place this code? I'd like to do something similar and alter the page view counts. Tried adding it to my template (with the WPPP code) but it didn't work...

  5. Héctor Cabrera
    Member
    Plugin Author

    Posted 3 months ago #

    That code can be used anywhere on your theme. The wpp_get_views template tag retrieves the views count for any post or page.

    I believe he's using that code within The Loop (or a custom loop).

Reply

You must log in to post.

About this Plugin

About this Topic