导航首页 » 网站优化

如何在dedecms5.7文章内容页调用关键词增加链接呢?

2023/03/11 12:12    魔司收录网    已浏览96次

考虑到seo优化,我看到很多网站都在内容页调用了关键词,这样也能增加外链,其实不难实现,下面是织梦实现代码:

{dede:field name='keywords' runphp='yes' }
                    if(!empty(@me))
                    {
                        $kws = explode(',',@me);
                        @me = "";
                        foreach($kws as $k)
                        {
                           @me .= "<a href='/plus/search.php?keyword=".urlencode($k)."' target=_blank ><h2>$k</h2></a> ";
                        }
                         @me= str_replace(' ', ' ',trim(@me));
                    }
 {/dede:field}

在你想实现的地方添加代码即可