【问题标题】:wordpress text domain issuewordpress 文本域问题
【发布时间】:2018-04-25 17:53:41
【问题描述】:

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

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 有文本域,它不是空字符串

我有什么想念的吗!

【问题讨论】:

  • 问句后,通常使用问号 ?不!
  • 我错过了什么:是的,代码
  • @madalinivascu 哈哈
  • 请在您的 style.css 文件中添加声明部分。
  • @madalinivascu 哟,你很搞笑:D

标签: php css wordpress wordpress-theming


【解决方案1】:

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

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

add_action( 'after_setup_theme', 'osiris_rathemes_setup' );

【讨论】:

  • 检查源代码或询问插件开发者它正在检查什么需要存在。
猜你喜欢
  • 2017-01-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-01-25
  • 1970-01-01
  • 2019-06-14
  • 2021-05-19
  • 1970-01-01
相关资源
最近更新 更多