pouya
pouya

Reputation: 43

how to use wordpress "Post Views Count" plugin?

http://wordpress.org/extend/plugins/baw-post-views-count/screenshots/

i'm installed and active "Post Views Count" plugin but when i'm use shortcode [post_view] like this, it's doesn't woek....

    <li><em>[most_view]</em></li>

OR:

    <li><em><?php [most_view] ?></em></li>

Upvotes: 1

Views: 2969

Answers (3)

Daniel L&#243;pez
Daniel L&#243;pez

Reputation: 716

If you would like to use shortcodes in your PHP code, you should check the Wordpress' do_shortcode() function: https://developer.wordpress.org/reference/functions/do_shortcode/

Example using the shortcode you provided:

<li><em><?php echo do_shortcode( '[most_view]' ); ?></em></li>

Upvotes: 0

Ehsan
Ehsan

Reputation: 2285

[most_view] is short code and must place in post content if you want to put post counts in your template use this:

<?php bawpvc_views_sc(); ?>

Upvotes: 1

Wouter de Boer
Wouter de Boer

Reputation: 114

Did you activate the plugin?

[most_view] must be placed in a post or page via the text-editor of the admin. Looks like you are making a template?

Upvotes: 1

Related Questions