Welcome to Muziang Template Demonstration Station
 Western Data

The code for zblog foreground to call the top article list separately

Channel: Model display Date: Browse: 496
 Western Data

After the zblog editor sets the article topping, it only displays at the top of the home page, category or global article list by default. How can I call the zblog topping article independently? use GetList() Function can easily call zblog top articles.

 The code for zblog foreground to call the top article list separately

Add the following code to the location to be displayed (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() 10 in the function is the number of articles to display.

After saving the file, update the cache on the background homepage.

 Western Data

zero Leaving a message.

comment

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