AT互联|ripro如何禁止“分类名称”自动加入到“关键词”_
AT互联|ripro如何禁止“分类名称”自动加入到“关键词”_手机扫码预览

AT互联|ripro如何禁止“分类名称”自动加入到“关键词”_

624
免费 优惠信息:免费 暂无永久SVIP下载特权
  • 免费售前咨询
  • 登录下载更划算哦
  • 付费安装资源
  • 付费终身升级
  • QQ保障售后服务
  • 网站应急咨询顾问

ripro如何禁止‘分类名称’自动加入‘关键词’

教程开始:

找到文件/wp-content/themes/ripro/inc/theme-functions.php

搜索 $keywords = \’\’;

大概在415行~434行,这是原来未修改的代码。

 $keywords = \'\';
    if (is_singular()) {
        if (get_the_tags($post->ID)) {
            foreach (get_the_tags($post->ID) as $tag) {
                $keywords .= $tag->name . \',\';
            }

        }
        foreach (get_the_category($post->ID) as $category) {
            $keywords .= $category->cat_name . \', \';
        }

        if (get_post_meta($post->ID, \'post_keywords_s\', true)) {
            $the = trim(get_post_meta($post->ID, \'keywords\', true));
            if ($the) {
                $keywords = $the;
            }
        } else {
            $keywords = substr_replace($keywords, \'\', -2);
        }

 

将以下代码替换上面的即可

    $keywords = \'\';
    if (is_singular()) {
        if (get_the_tags($post->ID)) {
            foreach (get_the_tags($post->ID) as $tag) {
                $keywords .= $tag->name . \',\';
            }

        }

        if (get_post_meta($post->ID, \'post_keywords_s\', true)) {
            $the = trim(get_post_meta($post->ID, \'keywords\', true));
            if ($the) {
                $keywords = $the;
            }
        } else {
            $keywords = substr_replace($keywords, \'\', -1);
        }

 

搞垫收工!!!

AT互联|ripro如何禁止“分类名称”自动加入到“关键词”_-AT互联全栈开发服务商

打破行业潜规则-更多选择 更低价格 更快交付!
AT互联全栈开发服务商 » AT互联|ripro如何禁止“分类名称”自动加入到“关键词”_
欢迎您光顾,建议使用 QQ 登录
喜欢我嘛?喜欢就按“ctrl+D”收藏我吧!♡