3
の上にショートコードを経由してPHP私はwordpressの最も人気のある記事を表示するためのプラグインを持って...常にページ
しかし、私はショートを経由して、それを追加するとき、それは常にページのトップに取得していないI
function top_news(){
\t $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>'
);
\t wpp_get_mostpopular($args);
\t return $args;
}
add_shortcode('topnews', 'top_news');
あなたは何を知っていますか:それを置く...私はのfunctions.phpで私のショートであるごとに返すために、プラグインPHPSにエコーが、それはここで...助けていなかった変更しましたできます?
おかげで、wpp_get_mostpopular
のドキュメントを読ん
ありがとうございました!今それは最終的に動作します! – till36