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

考虑到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}

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

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/206904950fdc197cecbf95461d518135.html