Support » Plugin: AJAX Hits Counter + Popular Posts Widget » How to use your plugin in my template?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author kutsy

    (@kutsy)

    post_hits() — this is invalid function name.
    Valid is ajax_hits_counter_get_hits()
    So you need to use like this:
    <?php echo( ajax_hits_counter_get_hits( get_the_ID() ) ); ?>
    or like this:
    <?= ajax_hits_counter_get_hits( get_the_ID() ) ?>

    Thank you very much.
    It worked perfectly.
    I owe you one.

    Hi Kutsy your plugin is amazing!

    I’ve tried a few plugins earlier and couldn’t get them to work how I wanted. But this plugin works out of the box.

    Anyways I’d like to know instead of using the widget can we place an html code(which includes all the features that widget has) in php files ?

    Thanks!

    Plugin Author kutsy

    (@kutsy)

    Anyways I’d like to know instead of using the widget can we place an html code(which includes all the features that widget has) in php files ?

    Hello.
    You can place widget in your theme (in functions.php, for example) and this will be working. But don’t forget of widget updating 🙂

    Thanks!

    Is there a shortcode to use this in posts?

    Plugin Author kutsy

    (@kutsy)

    Is there a shortcode to use this in posts?

    I’ll add this feature in next version of plugin.

    But now you can use
    <?php echo( ajax_hits_counter_get_hits( get_the_ID() ) ); ?>
    or:
    <?= ajax_hits_counter_get_hits( get_the_ID() ) ?>

    That’ll be awesome!

    Thanks

    Plugin Author kutsy

    (@kutsy)

    Is there a shortcode to use this in posts?

    I’ll add this feature in next version of plugin.

    AsankaD, check version 0.9.1

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to use your plugin in my template?’ is closed to new replies.