Hi jorisdieben,
There’s one slight mistake on your code:
do_shortcode('[wpp range=today limit=7 pages=0 stats_views=0 stats_comments=0 order_by=views wpp_start=<ul> wpp_end=</ul>]');
… should be:
do_shortcode('[wpp range=daily limit=7 pages=0 stats_views=0 stats_comments=0 order_by=views wpp_start=<ul> wpp_end=</ul>]');
There’s no ‘today’ value for the range attribute. It should be either daily, weekly, monthly or all.
Thread Starter
Joris
(@jorisdieben)
Of course thanks. But do you have any idea why only the ‘echo do_shortcode’ function is working and not the ‘get_mostpopular’ function? Maybe this explains why the sorting function on the category pages is not working (http://bit.ly/95PI2y) too? I am using the newest updates of everything btw.
Ps. If anyone need a script to merge the ‘WP Lesterchan Views’ with the ‘wordpress popular plugin’. I would be happy to share it..
Actually, what the get_mostpopular function does is call the shortcode function:
function wpp_get_mostpopular($args = NULL) {
if (is_null($args)) {
echo do_shortcode('[wpp]');
} else {
$atts = trim(str_replace("&", " ", $args));
echo do_shortcode('[wpp '.$atts.']');
}
}
Anyways, I feel like I’m not following here. Can you please elaborate more on your problem?
P.S.: just updated my plugin to version 2.1.1, right now you’re using 2.1.0 😉
Thread Starter
Joris
(@jorisdieben)
Oke, well somehow the get_mostpopular function doesn’t display the correct posts, but when I use the shortcode directly it does display the correct posts.
I thought maybe this small bug could explain why the additional plugin I wrote, is not working.
Have you tried using wpp_get_mostpopular instead?
Thread Starter
Joris
(@jorisdieben)
Yes I did. I will have someone have an extra look into it and inform you if I know more. Thanks so far.
jorisdieben, I would love to merge the views from the WP-PostViews plugin that I am using but I am not a programmer. Is there an easy way to do this that you can share with me? Otherwise the views are not accurate at all. Thanks!
jorisdieben, I would love to get the script to merge the ‘WP Lesterchan Views’ with the ‘wordpress popular plugin’ because I am moving my post views counter to wpp now and phasing out WP-PostViews.
How can you contact me to share?
Thread Starter
Joris
(@jorisdieben)
Sorry guys forgot to subscribe to the folluwup’s. If you are still interested in the merge script please contact me here: http://www.itelevision.nl/contact/
Thread Starter
Joris
(@jorisdieben)
Btw of course it will be free of charge!