• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

「静的フロントページの作成」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
(en:Creating a Static Front Page 15:20, 3 April 2010 Bono 版を翻訳用にコピー)
 
(リンク等調整、未翻訳)
1行目: 1行目:
 +
{{NeedTrans}}
 +
{{Rename|C}}
 +
 
__TOC__
 
__TOC__
 
By default, WordPress shows your most recent Posts on the front page of your site. But many WordPress users want to have a '''static front page''' or '''splash page''' as the front page instead. This "static front page" look is common for those who wish to not have a "blog" look to their site, giving it a more CMS (content management system) feel.  
 
By default, WordPress shows your most recent Posts on the front page of your site. But many WordPress users want to have a '''static front page''' or '''splash page''' as the front page instead. This "static front page" look is common for those who wish to not have a "blog" look to their site, giving it a more CMS (content management system) feel.  
4行目: 7行目:
 
When you create a static front page for your site, you must also create a way for WordPress to show your most recent posts in a "virtual directory" called <code>blog</code>, <code>news</code>, or whatever else you choose to call it. This is true whether or not you are actually using Posts in WordPress.
 
When you create a static front page for your site, you must also create a way for WordPress to show your most recent posts in a "virtual directory" called <code>blog</code>, <code>news</code>, or whatever else you choose to call it. This is true whether or not you are actually using Posts in WordPress.
  
Unlike a traditional WordPress "blog" front page, featuring the [[The_Loop|The WordPress Loop]], which generates a list of your most recent posts, the '''static front page''' is a customized [[Pages|Page]] that displays static content. It can be customized to direct people to featured content, or highlight posts, articles, categories, or contributors.  
+
Unlike a traditional WordPress "blog" front page, featuring the [[The Loop|The WordPress Loop]], which generates a list of your most recent posts, the '''static front page''' is a customized [[Pages|Page]] that displays static content. It can be customized to direct people to featured content, or highlight posts, articles, categories, or contributors.  
  
== Creating a Static Front Page ==
+
== Creating a Static Front Page <span id="Creating_a_Static_Front_Page"></span>==
  
 
Creating a virtual static front page does not require editing or coding of files or templates. Using the default configuration for a "static front page" in WordPress does not remove the sidebar or change the look of the entire site, just the content area.  
 
Creating a virtual static front page does not require editing or coding of files or templates. Using the default configuration for a "static front page" in WordPress does not remove the sidebar or change the look of the entire site, just the content area.  
  
To create the static front page, go to the WordPress [[Administration Panels]].  
+
To create the static front page, go to the WordPress [[管理パネル|Administration Panels]].  
  
 
# '''Create two WordPress [[Pages]] from the "Add New Page" panel.'''  
 
# '''Create two WordPress [[Pages]] from the "Add New Page" panel.'''  
21行目: 24行目:
 
### '''DO NOT add content''' to the Blog Page. Leave it blank. Any content here will be ignored -- only the Title is used.
 
### '''DO NOT add content''' to the Blog Page. Leave it blank. Any content here will be ignored -- only the Title is used.
 
### Publish the Page.
 
### Publish the Page.
# '''Go to [[Administration_Panels|Administration]] > [[Administration_Panels#Reading|Settings]] > [[Settings_Reading_SubPanel|Reading]] panel.'''
+
# [[Image:options-reading.png|right|thumb|Settings Reading SubPanel]]'''Go to [[管理パネル]] > [[管理パネル#Settings|設定]] > [[Settings Reading SubPanel|表示設定]].'''
 
## Set which page will be designated the "front" page. Choose from display your latest blog posts on the "Blog" Page and "static page" for the "Home" Page.  
 
## Set which page will be designated the "front" page. Choose from display your latest blog posts on the "Blog" Page and "static page" for the "Home" Page.  
## Save changes.[[Image:options-reading.png||640px|right|Settings Reading SubPanel]]
+
## Save changes.
 
# '''Enable "[[Using Permalinks|Permalinks]]"''' to show the "page title" in the address, since <code>/index.php?p=423</code> defeats the purpose of making a static front page.  
 
# '''Enable "[[Using Permalinks|Permalinks]]"''' to show the "page title" in the address, since <code>/index.php?p=423</code> defeats the purpose of making a static front page.  
  
 
While we are calling this a "static front page," you can change the content on that web page at any time by editing the [[Pages|Page]].
 
While we are calling this a "static front page," you can change the content on that web page at any time by editing the [[Pages|Page]].
  
==== The Front Page Conditional Tag====
+
==== The Front Page Conditional Tag <span id="The_Front_Page_Conditional_Tag"></span>====
  
; <tt>is_front_page()</tt> : When it is the front of the site displayed, whether it is posts or a [[Pages|Page]].  Returns true when the main blog page is being displayed and the '[[Administration_Panels#Reading|Settings]] > [[Settings_Reading_SubPanel|Reading]] ->Front page displays' is set to "Your latest posts", '''or''' when '[[Administration_Panels#Reading|Settings]] > [[Settings_Reading_SubPanel|Reading]] ->Front page displays' is set to "A static page" and the "Front Page" value is the current [[Pages|Page]] being displayed.
+
; <tt>is_front_page()</tt> : When it is the front of the site displayed, whether it is posts or a [[Pages|Page]].  Returns true when the main blog page is being displayed and the '[[管理パネル#Settings|設定]] > [[Settings Reading SubPanel|表示設定]] ->Front page displays' is set to "Your latest posts", '''or''' when '[[管理パネル#Settings|設定]] > [[Settings Reading SubPanel|表示設定]] ->Front page displays' is set to "A static page" and the "Front Page" value is the current [[Pages|Page]] being displayed.
  
==Troubleshooting Themes==
+
==Troubleshooting Themes <span id="Troubleshooting_Themes"></span>==
  
 
Not all WordPress Themes will easily convert to a static front page. Here are some troubleshooting tips to ensure the WordPress Theme you choose will work.
 
Not all WordPress Themes will easily convert to a static front page. Here are some troubleshooting tips to ensure the WordPress Theme you choose will work.
  
===Navigation Bars===
+
===Navigation Bars <span id="Navigation_Bars"></span>===
  
 
Some themes have top navigation bar containing links to Pages. By default most themes set "Home" as a link to the home page - in this case the static front page. Since you have created a separate page with the title "Home", there is a likelihood of another link text appearing as "Home".  
 
Some themes have top navigation bar containing links to Pages. By default most themes set "Home" as a link to the home page - in this case the static front page. Since you have created a separate page with the title "Home", there is a likelihood of another link text appearing as "Home".  
  
To change it, edit the appropriate [[Templates|template file]] featuring the code of the navigation bar with the template tag <code>[[Template_Tags/wp_list_pages|wp_list_pages]]</code>. Set the parameters to change the link title.
+
To change it, edit the appropriate [[Templates|template file]] featuring the code of the navigation bar with the template tag <code>[[テンプレートタグ/wp_list_pages|wp_list_pages]]</code>. Set the parameters to change the link title.
  
{{原文|Creating a Static Front Page|=85261}}<!-- 15:20, 3 April 2010 Bono 版 -->
+
{{原文|Creating a Static Front Page|85261}}<!-- 15:20, 3 April 2010 Bono 版 -->
  
[[Category:Getting Started]]
+
[[Category:初心者向けトピック]]
[[Category:Installation]]
+
[[Category:設置]]
[[Category:Design and Layout]]
+
[[Category:デザインとレイアウト]]
[[Category:Advanced Topics]]
+
[[Category:上級トピック]]
 
{{Copyedit}}
 
{{Copyedit}}
  
 
[[en:Creating a Static Front Page]]
 
[[en:Creating a Static Front Page]]

2010年4月4日 (日) 00:33時点における版

このページ「静的フロントページの作成」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています

ページ名検討中: このページ名「静的フロントページの作成」について改名が提案されています。ご意見をお寄せください。

By default, WordPress shows your most recent Posts on the front page of your site. But many WordPress users want to have a static front page or splash page as the front page instead. This "static front page" look is common for those who wish to not have a "blog" look to their site, giving it a more CMS (content management system) feel.

When you create a static front page for your site, you must also create a way for WordPress to show your most recent posts in a "virtual directory" called blog, news, or whatever else you choose to call it. This is true whether or not you are actually using Posts in WordPress.

Unlike a traditional WordPress "blog" front page, featuring the The WordPress Loop, which generates a list of your most recent posts, the static front page is a customized Page that displays static content. It can be customized to direct people to featured content, or highlight posts, articles, categories, or contributors.

Creating a Static Front Page

Creating a virtual static front page does not require editing or coding of files or templates. Using the default configuration for a "static front page" in WordPress does not remove the sidebar or change the look of the entire site, just the content area.

To create the static front page, go to the WordPress Administration Panels.

  1. Create two WordPress Pages from the "Add New Page" panel.
    1. Title one as "Home" (or another name) as your "static" front page.
      1. Set the "Home" template to the default template or any custom template.
      2. Add content you would like to see within the content area of the "Home" page.
      3. Publish the Page.
    2. Title the second one as "Blog" (or you could call it "News", "Articles", etc.). This page will be a place-holder for showing the Posts on your site.
      1. Do not use a custom Page template for this page!
      2. DO NOT add content to the Blog Page. Leave it blank. Any content here will be ignored -- only the Title is used.
      3. Publish the Page.
  2. Settings Reading SubPanel
    Go to 管理パネル > 設定 > 表示設定.
    1. Set which page will be designated the "front" page. Choose from display your latest blog posts on the "Blog" Page and "static page" for the "Home" Page.
    2. Save changes.
  3. Enable "Permalinks" to show the "page title" in the address, since /index.php?p=423 defeats the purpose of making a static front page.

While we are calling this a "static front page," you can change the content on that web page at any time by editing the Page.

The Front Page Conditional Tag

is_front_page() 
When it is the front of the site displayed, whether it is posts or a Page. Returns true when the main blog page is being displayed and the '設定 > 表示設定 ->Front page displays' is set to "Your latest posts", or when '設定 > 表示設定 ->Front page displays' is set to "A static page" and the "Front Page" value is the current Page being displayed.

Troubleshooting Themes

Not all WordPress Themes will easily convert to a static front page. Here are some troubleshooting tips to ensure the WordPress Theme you choose will work.

Navigation Bars

Some themes have top navigation bar containing links to Pages. By default most themes set "Home" as a link to the home page - in this case the static front page. Since you have created a separate page with the title "Home", there is a likelihood of another link text appearing as "Home".

To change it, edit the appropriate template file featuring the code of the navigation bar with the template tag wp_list_pages. Set the parameters to change the link title.

最新英語版: WordPress Codex » Creating a Static Front Page最新版との差分

この記事は翻訳時に編集が必要であるとマークされていました。その為Codex原文が大きく編集されている可能性があります。内容を確認される際は原文を参照していただき、可能であれば本項目へ反映させてください。よりよいCodexを作成するためのお手伝いをお願いします。