Title: 404 Widget for Google
Author: Dave McHale
Published: <strong>2008 年 11 月 1 日</strong>
Last modified: 2019 年 11 月 28 日

---

搜尋外掛

![](https://ps.w.org/google-404/assets/banner-772x250.png?rev=564564)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/google-404/assets/icon-256x256.png?rev=999354)

# 404 Widget for Google

 由 [Dave McHale](https://profiles.wordpress.org/dmchale/) 開發

[下載](https://downloads.wordpress.org/plugin/google-404.2.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/google-404/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/google-404/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/google-404/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/google-404/#developers)

 [技術支援](https://wordpress.org/support/plugin/google-404/)

## 外掛說明

**– This plugin has been adopted! Please review the description below. –**

A 404 page is what a user sees when they try to reach a non-existent page on your
site (because they’ve clicked on a broken link, the page has been deleted or they’ve
mistyped a URL).

While the standard 404 page can vary depending on your web host, it doesn’t usually
provide the user with much useful information and users may just surf away from 
your site. Therefore, Google recommend creating a custom 404 page that provides 
the user with more information about your site and its content.

The Google 404 widget is a quick and easy way to embed a search box on your custom
404 page and provide users with useful information designed to help them find the
information they need. Where it can, the Google widget will also suggest other ways
for the user to find the information they need, thus increasing the likelihood that
they’ll continue to explore your site.

For best results, you should set up a [Google webmaster account](http://www.google.com/webmasters/)
and submit an XML sitemap of your blog to ensure the Google 404 widget works effectively.

Find out more [here…](https://support.google.com/webmasters/answer/136085)

#### Features

Currently the plugin outputs the Google 404 widget in US English by default, or 
tries to use the current WordPress language.
 You can use the `google_404_language`
filter to specify a different language code.

Also looking to add the possibility to [change the appearance](https://support.google.com/webmasters/answer/100044)
of the widget.

#### Please note

The Google 404 widget plugin is NOT a WordPress widget.
 It is simply the term Google
use to describe their enhanced 404 page script.

#### Adoption Story

This plugin was originally developed by [Ben Huson](https://profiles.wordpress.org/husobj/)
and was adopted in September 2014 thanks to the [adopt-me](https://wordpress.org/plugins/tags/adopt-me)
tag.

#### Coming Soon!

The ability to customize the CSS from an options page within the WordPress Admin
area, attempt to dynamically inject the Google search box without needing to modify
your template files, and more!

## 安裝方式

You should first set up a [Google webmaster account](http://www.google.com/webmasters/)
and submit an XML sitemap of your site to ensure the Google 404 widget works effectively.

 1. Download the archive file and uncompress it.
 2. Put the “google-404” folder in “wp-content/plugins”
 3. Enable in WordPress by visiting the “Plugins” menu and activating it.
 4. Add the `google404()` function call to your 404.php template.
 5. if ( function_exists( ‘google404’ ) ) { google404(); }

You could also add this code to your theme’s index.php, single.php, image.php, archive.
php and search.php below the HTML that is displayed if no posts are present (where
you insert this may vary from theme to theme).

You may also use the `google_404_styles` and `google_404_language` filters for manually
overriding the CSS values or language used by the Google 404 widget.

## 常見問題集

Currently no FAQs.

## 使用者評論

![](https://secure.gravatar.com/avatar/1ffbd597f901ceffbe56476fb33d56aa904e9d5364f599fb10942c9832c48c47?
s=60&d=retro&r=g)

### 󠀁[Recommended As A Replacement to WordPress 404](https://wordpress.org/support/topic/recommended-as-a-replacement-to-wordpress-404/)󠁿

 [](https://profiles.wordpress.org/gegan249/) 2016 年 9 月 3 日

I’m using Virtue and after creating a child theme, moved 404.php to my child theme(
so it wouldn’t be overwritten at a core update.) In place of Wordpresses `<?php 
get_search_form(); ?>’ I replaced the plugin’s Google 404 search bar and it worked
perfectly. It’s a better user experience.

 [ 閱讀全部 1 則使用者評論 ](https://wordpress.org/support/plugin/google-404/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈404 Widget for Google〉的開發相關工作。

參與者

 *   [ Dave McHale ](https://profiles.wordpress.org/dmchale/)

〈404 Widget for Google〉外掛目前已有 2 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/google-404/contributors)
為這個外掛做出的貢獻。

[將〈404 Widget for Google〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/google-404)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/google-404/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/google-404/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/google-404/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/google-404/)。

## 變更記錄

#### 2.1

 * Changing plugin name to avoid [trademark violation](https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/#17-plugins-must-respect-trademarks-copyrights-and-project-names)
 * General code QoL updates
 * Added minimum PHP & WP requirements (5.3 & 4.4 respectively). CAUTION: Both of
   these will be updated in a future release, likely to 5.6 and 4.9

#### 2.0

 * Initial release after adoption.
 * Updated docblock and readme file to remove adopt-me tag and reflect new ownership.
 * Added blank index.php
 * Added plugin icons for 4.0 support

#### 1.1

 * Added ‘google_404_language’ filter.
 * Added ‘google_404_styles’ filter.

#### 1.0.2

 * Added GPL License info.
 * Try to use current WordPress language before defaulting to English.
 * Moved all functionality into class.
 * Update styles.

#### 1.0.1

 * Added documentation to read me file.

#### 1.0

 * First release.

## 中繼資料

 *  版本 **2.1**
 *  最後更新 **7 年前**
 *  啟用安裝數 **50+**
 *  WordPress 版本需求 ** 4.4 或更新版本 **
 *  已測試相容的 WordPress 版本 **5.3.21**
 *  PHP 版本需求 ** 5.3 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/google-404/)、[Spanish (Chile)](https://cl.wordpress.org/plugins/google-404/)、
   及 [Spanish (Spain)](https://es.wordpress.org/plugins/google-404/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/google-404)
 * 標籤:
 * [404](https://tw.wordpress.org/plugins/tags/404/)[error](https://tw.wordpress.org/plugins/tags/error/)
   [google](https://tw.wordpress.org/plugins/tags/google/)
 *  [進階檢視](https://tw.wordpress.org/plugins/google-404/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/google-404/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/google-404/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/google-404/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/google-404/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/google-404/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/google-404/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/google-404/reviews/)

## 參與者

 *   [ Dave McHale ](https://profiles.wordpress.org/dmchale/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/google-404/)