簡單的建立自定義page的方法。 如果page attribute找不到,在quick edit裡面有。screen option裡有時候勾選掉了。
http://premium.wpmudev.org/blog/creating-custom-page-templates-in-wordpress/
類似的比較詳細的一個
A Detailed guide to customise the page template
函數介紹
is_home() 判斷是否爲首頁,並且顯示的不是一個靜態頁面
is_front_page()判斷是否爲首頁,包括首頁顯示的是一個靜態頁面
is_search()是否爲搜索頁
is_404()是否爲404頁面
is_category()是否爲分類目錄歸檔
is_author()是否爲作者歸檔頁面
is_day()是否爲按天歸檔頁面
is_month()是否爲按月歸檔頁面
is_year()是否爲按年歸檔頁面
is_tag()是否爲標籤歸檔頁面
is_single()是否爲文章頁面
is_page()是否爲頁面單頁
is_date()是否按日期歸檔頁面,相當於包括is_day()、is_month()、is_year()
is_archive()是否爲歸檔頁面,相當於包括is_category()、is_author()、is_month()、is_day()、is_year()、is_tag()
is_singular()相當於is_single()||is_page()||is_attachment()