• Resolved astrixoblix

    (@astrixoblix)


    hello everyone,

    I want to display the view counters (%totalcount%, %dailycount% or %overallcount%) on my posts but with PHP function.

    I know it’s possible by default in plugin settings, but actually i want to display the counters with PHP on my header posts on first page.

    could you give me some assist, please ?
    thanks

    http://wordpress.org/plugins/top-10/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Ajay

    (@ajay)

    <?php if(function_exists('echo_tptn_post_count')) echo_tptn_post_count(); ?>
    Thread Starter astrixoblix

    (@astrixoblix)

    thanks Ajay for responding.

    i have another question:
    how it’s possible to display the counters separate. means i don’t want to echo the whole content. for example i want to display only the overall counter without any other content, just the counter.

    thanks

    Plugin Author Ajay

    (@ajay)

    There is no way to do that currently. The plugin uses the settings in the settings page to display the count and text. So you’re limited to only one style option.

    I’ll put this on the TODO list for this plugin.

    Thread Starter astrixoblix

    (@astrixoblix)

    Thanks Ajay for giving help.

    I will wait for new updates. it will be very nice if the plugin let us use the counters separately and manually, because they’re not spam like other view counter plugins.

    thanks again

    Plugin Author Ajay

    (@ajay)

    Definitely 🙂

    Plugin Author Ajay

    (@ajay)

    Hi,

    I’ve added a new function in the latest version of the plugin (1.9.8.5).

    You can use get_tptn_post_count_only($id, $count = 'total')
    Use either total, daily or overall to get the count.

    Thread Starter astrixoblix

    (@astrixoblix)

    Hi,

    Thanks for you supports. keep it up!
    i will look forward back if anything missed or i had any other idea.

    thanks again.

    Plugin Author Ajay

    (@ajay)

    That sounds great. Do consider giving this plugin a good review 🙂

    Hello, great plugin man!

    May I ask you a question about the issue of this post?

    I added that php code to the page but on the page I see (overall count 1, today 1) on every post that hasn’t been read yet… Is there a way to set a default phrase for that kind of posts?

    Thanks!

    Plugin Author Ajay

    (@ajay)

    There isn’t a default phrase option.

    If there are no views or 1 view the plugin displays this as 1. The logic is that if a visitor has visited the page, then it is definitely 1 view.

    Yeah,you’re right but I have a homepage that displays the excerpts of the 8 recent posts… maybe you can take a look at it here

    Plugin Author Ajay

    (@ajay)

    Is it the “(Letto 1 volte di cui 1 oggi)” part?

    Yes it is, sorry, I forgot to mention that the site is in italian 🙂

    It means (Read 1 time, 1 time today)

    Plugin Author Ajay

    (@ajay)

    There isn’t a way to change this now. I’ll put this on the list of things to do where you can set an alternate text in case there are no hits.

    That sounds great, thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[How to] display views number on theme’ is closed to new replies.