Zblog foreground calls the code of top article list separately

Exhibition of works zero two hundred and six

After the zblog editor has set the article top, it will only be displayed at the top of the home page, category or global article list by default. How can I call zblog to top the article alone? use GetList() Function can easily realize the call of zblog top article.

 Zblog foreground calls the code of top article list separately

Add the following code to the location you want to display, such as the theme index. PHP file:

PHP
 {$sticky = GetList(10, null, null, null, null, null, array('only_ontop'  => true))}<ul> {foreach $sticky as $top} <li> <a href="{$top.Url}" title="{$top.Title}"> {$top.Title} </a> </li> {/foreach}</ul>

GetList() The 10 in the function is the number of articles to display.

After saving the file, update the cache on the front page of the background.

Related recommendations:

Comments from netizens:

I would like to comment:

Welcome to participate in the discussion. Please express your views and exchange your views here.
 Verification Code