1. SEO优化_织梦仿站[低至599]_网络营销推广服务-一秒搜 > SEO优化 > SEO技巧 > >

织梦文章页每个TAG标签单独输出相关文章

每个TAG标签效果

内容页模板标签写法

{dede:tag row='30' sort='new' getall='0'}<div class="hot mt1"><dl class="tbox light"><dt class='light'><strong>[field:tag /]</strong></dt><dd class='light'><ul class="c1 ico2">[field:tag runphp=yes]global $dsql,$id,$aid;$myid = isset($id) ? $id : $aid;$taga = @me;$arow = $dsql->GetOne("Select * From `dede_tagindex` where tag like '$taga'");$tid = $arow['id'];if($tid!=''){$tagsql = "Select aid From `dede_taglist` where tid = $tid And arcrank > -1 group by aid order by aid desc";$dsql->SetQuery($tagsql);$dsql->Execute('t');$result = '';while($arow = $dsql->GetArray('t')){$ids[] = $arow['aid'];}}if(count($ids) > 0){$idsStr = join(',', $ids); $query = "Select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule, tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath from `dede_archives` arc left join `dede_arctype` tp on arc.typeid=tp.id where arc.arcrank>-1 and arc.id in($idsStr) And arc.id<>$myid order by arc.id desc limit 10";//输入多少个文章}$dsql->SetQuery($query);$dsql->Execute('t');$result = '';$totalRow = $dsql->GetTotalRow();while($row = $dsql->GetArray('t')){$arcurl = GetOneArchive($row['id']);$result .= "<li><a href='{$arcurl['arcurl']}'>{$row['title']}</a></li>";}if($result=='') $result = "<p style='color:#f00;'> 该TAG标签没有相关文章</p>";@me = $result;[/field:tag]</ul></dd></dl></div>{/dede:tag}

免责声明:本文由 一秒搜在https://www.1miaoseo.com发布,不代表SEO优化_织梦仿站[低至599]_网络营销推广服务-一秒搜立场。

本站所发布文章和图片均来自用户分享和网络收集,https://www.1miaoseo.com/seojc/seojq_1422.html文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。