php - wordpress文本域问题

标签 php css wordpress wordpress-theming

所以我用主题检查插件测试我的错误 然后去文本域问题,但它返回一个空白值!这是从什么时候开始的!!

REQUIRED: This theme text domain does not match the theme's slug. The text domain used: This theme's correct slug and text-domain is osiris-rathemes.


/*
Theme Name: osiris rathemes
Theme URI: https://themeforest.net/user/ra-themes/portfolioa
Author: Mohamed Said
Author URI: https://themeforest.net/user/ra-themes
Description: some dec
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: osiris-rathemes

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

主题文件夹名称为文本域 并且 style.css 具有文本域并且它不是空字符串

我错过了什么吗!

最佳答案

也许您需要在 functions.php 文件中加载主题 textdomain。你的 style.css 文件看起来是正确的,但我不知道你的主题插件检查器在做什么..

function osiris_rathemes_setup() {
    load_theme_textdomain( 'osiris-rathemes', get_template_directory() . '/languages' );
}

add_action( 'after_setup_theme', 'osiris_rathemes_setup' );

关于php - wordpress文本域问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47257728/

相关文章:

php - 如何使用 Wordpress 处理这个 CSS 问题?

php - 如何使用 Jquery 正确解析数据库中的结果数组?

php - 在注册上创建一个新的 OneToOne 关系

javascript - 垂直旋转木马切断图像

html - 用户点击/触摸 div 时的 CSS 框阴影效果

html - 高度等于 100% 不适用于 IFrame

mysql - 本地主机拒绝连接 wamp windows 10

php - 在 Symfony 中访问 wordpress 博客

php - WordPress 错误 : There has been a critical error on your website. 请检查您的站点管理员电子邮件收件箱以获取说明

php - 来自数据库的下拉菜单