wordpress - 如何更改 Woocommerce 管理员面包屑链接标题
问题描述
我试过像这样在function.php中添加gettext,
add_filter( 'gettext', 'wps_translate_words_array' );
add_filter( 'ngettext', 'wps_translate_words_array' );
function wps_translate_words_array( $translated ) {
$words = array(
// 'word to translate' = > 'translation'
'WooCommerce' => 'Home',
);
$translated = str_ireplace(array_keys($words), $words, $translated );
return $translated;
}
但它不起作用!
解决方案
推荐阅读
- c++ - winrt/c++:等待分派任务的结果
- python - .DLL 加载来自 .EXE 但不是 .DLL
- node.js - SendGrid NodeJS - Client.request() 不是函数
- javascript - 如何创建一个查找 URL 的页面并创建一个引用该 URL 的文本?
- google-apps-script - Google 应用程序脚本 gmail 线程和线程行为中的消息
- python - 根据组标准 pandas 在组中删除值
- ionic-framework - 进行更改,保存,但 cordova 运行以前的代码
- java - 用户界面(UI)作为springboot中的不同微服务
- sql-server - SQL Server - 从选择创建文本表
- xcode - 在 Android Studio 和 Xcode 中运行 Flutter 应用程序时出错