Title: Default Theme Pages
Author: Carlos
Published: <strong>2012年6月18日</strong>
Last modified: 2012年8月30日

---

プラグインを検索

![](https://ps.w.org/default-theme-pages/assets/banner-772x250.png?rev=559748)

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://s.w.org/plugins/geopattern-icon/default-theme-pages_fbfbfb.svg)

# Default Theme Pages

 作者: [Carlos](https://profiles.wordpress.org/carlos_a_sanz/)

[ダウンロード](https://downloads.wordpress.org/plugin/default-theme-pages.zip)

 * [詳細](https://ja.wordpress.org/plugins/default-theme-pages/#description)
 * [レビュー](https://ja.wordpress.org/plugins/default-theme-pages/#reviews)
 * [開発](https://ja.wordpress.org/plugins/default-theme-pages/#developers)

 [サポート](https://wordpress.org/support/plugin/default-theme-pages/)

## 説明

#### This plugin is intended to be useful for template developers

#### New in version 0.4

 * added ‘object’ (page object) in every $default_theme_pages item for fast access.
 * added all default pages to wp toolbar, inside ‘site name’, to increase user experience.

#### How to use

Add this code in your _functions.php_.

    ```
    global $default_theme_pages;
    $default_theme_pages = array(
        array(
            'name' => 'home',               // initial slug page / id for templating - access functions
            'title' => 'Homepage',          // page title
            'option' => 'page_on_front',    // option page id ( stores the page id in an option, use only in theese cases)
            'description' => 'homepage'     // description
        ),
        array(
            'name' => 'blog',
            'title' => 'Blog',
            'option' => 'page_for_posts',
            'description' => 'blog'
        ),
        array(
            'name' => 'contact',
            'title' => 'Contact me!',
            'description' => 'Contact form page'
        )
     );
    ```

#### Tips

 * After the pages are created automatically, you can change their title and slug
   without problem.
 * If you add an `option` names: `page_on_front` and `page_for_posts`, you will 
   block the _home-page_ and the _blog-page_ on your site.

#### Templating

You can template using **ID** or **name** (setted up in $default_theme_pages global
variable ), something like:

**page-131.php** or **page-contact.php** (If you change the page slug, this will
still work because ‘contact’ was defined as _pagename_ if $default_theme_pages global
variable).

For detect if you’re in that page:

    ```
    dtp_is_page('contact')
    ```

Getting a default page id:

    ```
    $page_id = dtp_get_page_id('contact');
    ```

This method is more quick than _get\_page\_by\_path_ because page ID is stored on
global variable.

## スクリーンショット

[⌊Admin pages list⌉⌊Admin pages list⌉[

Admin pages list

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

Default Theme Pages はオープンソースソフトウェアです。以下の人々がこのプラグイン
に貢献しています。

貢献者

 *   [ Carlos ](https://profiles.wordpress.org/carlos_a_sanz/)

[“Default Theme Pages” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/default-theme-pages)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/default-theme-pages/)する
か、[SVN リポジトリ](https://plugins.svn.wordpress.org/default-theme-pages/)をチェック
するか、[開発ログ](https://plugins.trac.wordpress.org/log/default-theme-pages/)を
[RSS](https://plugins.trac.wordpress.org/log/default-theme-pages/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 0.4

 * added ‘object’ (page object) in every $default_theme_pages item for fast access.
 * added all default pages to wp toolbar, inside ‘site name’, to increase user experience.

#### 0.3

 * changed stored system to gain performance
 * added ‘id’ in every $default_theme_pages item for fast use
 * added some accessible functions: `dtp_is_page`, `dtp_get_page_id`
 * added default pages in template system, now you can template a default page as:`
   page-name.php`

#### 0.2

 * blocked status modifications
 * blocked move to trash

#### 0.1

 * Initial release

## メタ

 *  バージョン **0.4**
 *  最終更新日 **14年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 3.0またはそれ以降 **
 *  検証済み最新バージョン: **3.4.2**
 *  言語
 * [English (US)](https://wordpress.org/plugins/default-theme-pages/)
 * タグ
 * [block](https://ja.wordpress.org/plugins/tags/block/)[pages](https://ja.wordpress.org/plugins/tags/pages/)
   [templating](https://ja.wordpress.org/plugins/tags/templating/)[theme](https://ja.wordpress.org/plugins/tags/theme/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/default-theme-pages/advanced/)

## 評価

レビューはまだ送信されていません。

[Your review](https://wordpress.org/support/plugin/default-theme-pages/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/default-theme-pages/reviews/)

## 貢献者

 *   [ Carlos ](https://profiles.wordpress.org/carlos_a_sanz/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/default-theme-pages/)