wp ripro主题修改教程集合
1.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); }
2.最新文章模块如何显示设置
1:RIPRO主题设置-首页设置-首页布局模块 拉入最新文章模块
2:RIPRO主题设置-首页设置-最新文章模块-模块顶部ajax分类获取文章按钮 打开
3:要显示分类按钮(分类下必须有文章)填选分类
4:RIPRO主题设置-极致主题设置-首页设置-开启/关闭全站栏目顶部设置 里面可设置:首标题、副标题1、副标题2
效果图:
3.主题美化首页“最新文章”标题文字美化教程
1、找到/wp-content/themes/ripro/parts/home-mode/lastpost.php并找到以下代码
<h3 class=”section-title”><span><i class=”fa fa-list-alt”></i> 最新文章</span></h3>
并将附件内的lastpost.php内容整体复制替换以上代码即可
2、找到wp-content/themes/ripro/assets/css/diy.css并将附件内的diy.css内容整体复制进去并保存
附件直链【点击去拿】
效果样式:
本文来源:软盟基地,转载请注明出处!如果需要定制开发网站、二次开发程序、搭建微商城、制度平台、小程序商城、多端小程序 请联系我们!

扫一扫,加我微信