Archived

This topic is now archived and is closed to further replies.

  • 0

Views In Metabar

Question

Posted · Report post

i m trying to display views counter in metabar

I installed wp-postviews and the function to display it is:

if(function_exists('the_views')) { the_views(); } 
Now i want to create a shortcode [views] for that :

function viewsshortcode() {


here should go the something....


}

add_shortcode('views', 'viewsshortcode');

[/code]

Can you help?

Share this post


Link to post
Share on other sites

2 answers to this question

Posted · Report post

Please look at my site, the views counter apears over title instead inside the metabar...

in the sidebar on any article page, the 2nd tab content which i call by shortocde, also jumps out of the tab and apears over widget title.

i think this is something general with shortcodes...

Share this post


Link to post
Share on other sites

Posted · Report post


function viewsshortcode() {

if(function_exists('the_views')) {
the_views();
}
}
add_shortcode('views', 'viewsshortcode');
[/CODE]

Share this post


Link to post
Share on other sites