Calling related articles in an article can increase the relevance of page content and improve the PV of the website. How can zblog blog call related articles below the content of the article page? You can use the GetList() function provided by zblog to call related articles according to the article tag tag.
In the post single. php file of the topic (or the single. php file if not), find the code {$article. Content}, and add the following code below the code:
{$array = GetList(10,null,null,null,$article->Tags,null,array('is_related'=>$article->ID))}{if $array}<section class="related"> <h3>Related articles</h3> <ul> {foreach $array as $related} <li> <a href="{$related.Url}" title="{$related.Title}">{$related.Title}</a> </li> {/foreach} </ul></section>{/if}
After saving the file, click [Clear Cache and Recompile Template] on the background homepage.
Tips: Change the second null to the current column ID, and you can also call related articles with the same category and label, which is more relevant.