zblog php call the method specified tag list of articles

We do zblog topic often need to call the specified tag list of articles, so you can make your site content category diversity, to show richer.

By calling the following code can be achieved:

PHP
{$array=Getlist(9,null,null,null,array($zbp->GetTagByID(242),$zbp->GetTagByAliasOrName('phptheme')));} {foreach $array as $article} {template:thumbnail} <div class="theme-item"> <div class="theme-item-box"> <div class="theme-bg" style="background:url({$temp}) no-repeat center top; background-size:cover;"><a href="{$article.Url}" title="{$article.Title}" target="_blank"></a> </div> <div class="theme-title"> <h3><a href="{$article.Url}" class="overdot work-title" target="_blank" title="{$article.Title}">{$article.Title}</a></h3> <div class="theme-description">{$article.Intro}</div> <div class="theme-meta"> <div class="theme-meta-price"> <div class="download-meta-price-details"> <a href="{$article.Category.Url}" rel="bookmark"><span class="edd_price">{$article.Category.Name}</span></a> </div> </div> <div class="theme-meta-name"> <span class="author vcard"><i class="fa fa-eye"></i>{$article.ViewNums}</span> </div> </div> </div> </div> </div> {/foreach}

Code number 9 is the number of articles called, 242 is id tag labels, phpheme is an alias tag.

The above content can be adjusted according to their needs.

You can view a list of call classification: zblog call PHP category list

Display of results:

tag-list.png

Guess you like

Origin www.cnblogs.com/wyw678/p/11867774.html