QQ咨询不加好友发不了信息,咨询前先加好友! → QQ:820896380 ×

WordPress 给关键字自动添加文章链接

WordPress 发表文章后,建立锚文本链接在网站优化中有很重要的作用,WoredPress 可通过添加函数设置特定关键字自动添加链接。方法1:添加代码实现在你的主题下面的 functions.php 文件里,添加以下代码function replace_content_keyword($content){ $rep...

WordPress 发表文章后,建立锚文本链接在网站优化中有很重要的作用,

WoredPress 可通过添加函数设置特定关键字自动添加链接。

方法1:添加代码实现

在你的主题下面的 functions.php 文件里,添加以下代码

function replace_content_keyword($content){  $replace = array(      '星速云wordpress' => '<a href="https://www.seo628.com" rel="home">星速云wordpress</a>',      'wordpress主题' => '<a href="https://www.seo628.com" rel="home">wordpress主题</a>',      'wordpress企业主题' => '<a href="https://www.seo628.com" rel="home">wordpress企业主题</a>',   );  $content = str_replace(array_keys($replace), $replace, $content);  return $content;}add_filter('the_content', 'replace_text_wps');

方法2:安装插件实现

WP Keyword Link (已下架)

Links Auto Replacer 官网:https://wordpress.org/plugins/links-auto-replacer/

Links Auto Replacer zip包:links-auto-replacer.zip

给TA打赏
共{{data.count}}人
人已打赏
wordpress教程

wordpress企业网站如何才能得到排名

2023-2-16 15:59:30

wordpress教程

强力推荐实用的29个优秀的wordpress网站插件

2023-2-16 15:59:37

个人中心
购物车
优惠劵
有新私信 私信列表
搜索