我正在测试一个主题更新在我们的网站上使用一个由WPStaging创建的分期网站。那部分似乎很好用。然后我升级了主题,用它创建了一个子主题,并将这个子主题应用于其中。现在,每个帖子、页面甚至菜单的标题都是“加载子主题”(见下文)。然而,当我编辑一页或一篇文章时,正确的标题仍然存在(事实上,关于该页面或文章的所有内容在编辑器中都是正确的)。有什么想法吗?
发布于 2020-05-27 16:12:14
UUA主题提供了一个起始子主题,它由一个示例style.css
文件和functions.php
文件组成。这些文件包括几行代码,以测试子主题是否正确加载。
您需要从这两个文件中删除此测试代码,这些代码在代码注释中标识。
具体来说,functions.php中的这个代码:
/**
* Below is a test to confirm the parent theme is being overridden by the child.
* If your page titles say, "Child Theme Loaded," the child theme is working.
* After you confirm it's working, delete this function and filter.
*/
function uuatheme_title() {
return "Child Theme Loaded";
}
add_filter( 'the_title', 'uuatheme_title' );
下面是style.css中的代码:
/**
* Below is a test to confirm this stylesheet is being applied.
* It turns all text to all caps. DELETE this after confirmation.
*/
body {
text-transform: uppercase !important;
}
https://wordpress.stackexchange.com/questions/367682
复制相似问题