I got a plugin for wordpress to show the most popular posts...
But when I add it via shortcode it always gets to the top of the page and not where I placed it... I changed every echo in the plugin PHPs to return but it didn't helped... Here is my shortcode in functions.php:
function top_news(){
$args = array(
'limit' => 15,
'range' => 'daily',
'freshness' => 1,
'order_by' => 'views',
'post_type' => 'post',
'stats_views' => 1,
'stats_author' => 1,
'stats_date' => 1,
'wpp_start' => '<table class="topnachrichten"><tr><th>Datum</th><th>Top Nachrichten von Heute</th><th>Leser</th></tr>',
'wpp_end' => '</table>',
'stats_date_format' => 'd',
'excerpt_by_words' => 1,
'excerpt_length' => 35,
'title_length' => 66,
'post_html' => '<tr><td class="datum">{date}. Aug</td><td class="stext"><details>
<summary><a href="{url}">{title}</a><span class="plus">+</span></summary>{summary}<br><a href="{url}">Weiterlesen</a></details></td><td class="views">{views}</td></tr>'
);
wpp_get_mostpopular( $args );
return $args;
}
add_shortcode( 'topnews', 'top_news' );
Do you know what I can do?
Thanks, Till
</div>