最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

All Titles and Menus changed to "CHILD THEME LOADED"

programmeradmin0浏览0评论

I'm testing out a theme update on our website using a staged site created by WPStaging. That part seemed to work well. Then I upgraded the theme, created a child theme from it, and applied that child them to it. Now the title of every post, page, and even menu is "CHILD THEME LOADED" (see below). Yet when I edit a page or a post, the correct title is still there (in fact everything about the page or post looks correct in the editor). Any ideas?

I'm testing out a theme update on our website using a staged site created by WPStaging. That part seemed to work well. Then I upgraded the theme, created a child theme from it, and applied that child them to it. Now the title of every post, page, and even menu is "CHILD THEME LOADED" (see below). Yet when I edit a page or a post, the correct title is still there (in fact everything about the page or post looks correct in the editor). Any ideas?

Share Improve this question edited Jun 15, 2020 at 8:21 CommunityBot 1 asked May 27, 2020 at 14:08 Fred HamiltonFred Hamilton 1153 bronze badges 1
  • 3 It looks like the theme has a bug that filters the_title in the event of a child theme being in place. Your best course of action is to contact the theme's author. – cjbj Commented May 27, 2020 at 14:16
Add a comment  | 

1 Answer 1

Reset to default 2

The UUA Theme offers a starter child theme which consists of an example style.css file and functions.php file. These files include a few lines of code to test if the child theme is loading correctly.

You need to delete this test code from both files, which is identified in code comments.

Specifically, this code in 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' );

And this code in 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;
}
发布评论

评论列表(0)

  1. 暂无评论