You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何移除WordPress页面标题中的"homepage"字样?

Fixing the "homepage" Text in Your WordPress Page Title

Hey there! Let’s get rid of that unwanted "homepage" text cluttering up your site’s page title. Here are the most common ways to fix this, depending on how your WordPress setup is configured:

1. Check Your Theme’s Customizer First

Most modern themes let you tweak page titles directly in the Customizer—no code needed:

  • Head to Appearance > Customize in your WordPress dashboard.
  • Hunt for sections like Site Identity, Header Settings, or SEO & Social (names vary by theme, so don’t be afraid to poke around a bit).
  • Look for fields labeled "Homepage Title" or "Frontpage Title"—you’ll likely find the "homepage" text here that you can delete or rewrite.
  • Hit Publish to save your changes once you’re done!

2. Adjust Your SEO Plugin Settings

If you use an SEO tool like Yoast SEO or Rank Math, they often take control of page titles:

  • Yoast SEO: Go to SEO > Search Appearance > Homepage. Edit the "Homepage title" field to remove the "homepage" text, then save.
  • Rank Math: Navigate to Rank Math > Titles & Meta > Homepage. Tweak the title template to erase any mention of "homepage" and update your settings.

3. Use a Custom Filter (For Code-Savvy Folks)

If the above methods don’t work, you can add a small code snippet to target the title directly. Use a child theme or a code snippet plugin (like Code Snippets) to avoid losing changes when your theme updates:

add_filter( 'wp_title', 'remove_homepage_from_title', 10, 2 );
function remove_homepage_from_title( $title, $sep ) {
    // Only target the homepage
    if ( is_front_page() ) {
        // Remove "homepage" (case-insensitive)
        $title = preg_replace( '/\bhomepage\b/i', '', $title );
        // Clean up any extra spaces left behind
        $title = trim( str_replace( $sep . '  ', $sep . ' ', $title ) );
    }
    return $title;
}

4. Double-Check Your Static Homepage Settings

If you’ve set a specific page as your homepage:

  • Go to Pages > All Pages and edit your homepage.
  • Look in the right-hand Document sidebar for a SEO Title field (added by your theme/plugin) or the default page Title field. If "homepage" is in either, edit it out.
  • Update the page and refresh your site to see the change.

内容的提问来源于stack exchange,提问作者Software Engineer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 18:32:27