Collect this site A professional website for web template!

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

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

consultation:

400 888 8888

Product Introduction

User evaluation

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.

Related products

User comments

*

*

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

400 888 8888