Home page >> Related Tutorials >>Body

ZBLOGPHP obtains and sorts articles of multiple categories

Author: A little Jack    Time: 2022-09-10 12:37:55    Browse: 1587   

Dunga: Let's share the method for zblog to obtain multiple classified articles, which is still needed in some cases.

PHP function

Hello, you need to log in to our account to view the hidden content, please first Sign in To view!

Call code

 {foreach $array=Subject ID_GetArticleCategories (10, '1,2,3', true) as $articles}     <li><a href="{$articles.Url}">{$articles.Title}</a></li> {/foreach}

The number of 10 article calls, '1,2,3' is the corresponding classification ID, and multiple classification IDs are separated by commas.

To sort the article list, modify the code log_PostTime as follows:

 Log_PostTime//Sort by time; Log_CommNums//Sort by the number of comments; Log_ViewNums//Sort by the number of views;

The sorting can be performed in reverse order and positive order according to DESC and ASC.


Text label: ZBLOG   Article sequence   Latest articles   The hottest article  
 A little Jack

A little Jack https://lkba.cn

The blogger focuses on Z-Blog website construction, website optimization, computer troubleshooting, reinstallation, optimization, maintenance system, etc., QQ/WX: 2126245521 (please specify the purpose)

Related articles

Previous:

Next:

No comment for this article - Welcome

 Please fill in the verification code

Processed : 0.060 SQL : 25