I'm using the latest popularity contest plugin. I want to display 10 most popular posts (pages excluded) in a normal text widget.
I have no knowledge of PHP, but I found this code to b working but it does not exclude pages.
<?php if (function_exists('akpc_most_popular')) { ?>
<ul>
<?php akpc_most_popular(); ?>
</ul>
<?php } ?>
PS. I don't mind having popularity rating on pages I just don't want them displayed with most popular posts in my text widget.
Thanks!
You'd probably have to modify the get_top_rated_posts function in that plugin to ignore posts with a post_type of 'page'.
Also to execute PHP in a Widget, consider downloading and installing Otto's PHP Code Widget.
Thanks for the answer but I have no idea how to do that.
I already have a plugin that executes php in widget and I'm already using the above code in a text widget. I just need info on how to ignore posts with a post_type of 'page', like you said.
Any update on this? I'm still trying to figure it out.
Anyone know specifically how to exclude pages from Popularity Contest?