[WordPress] 外掛分享: Custom HTML/PHP Post Templates

前言介紹

  • 這款 WordPress 外掛「Custom HTML/PHP Post Templates」是 2016-12-21 上架。
  • 目前有 90 個安裝啟用數。
  • 上一次更新是 2017-07-09,距離現在已有 2855 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0.1 以上版本才可以安裝。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

stephenafamo |

外掛標籤

php | html | custom pages | custom posts | custom templates |

內容簡介

這個外掛讓你可以使用任何 HTML 或 PHP 檔案作為任何頁面或文章的模板。

只需要上傳檔案並選擇它即可。
你可以將自定義的 js 和 css 檔案上傳到媒體庫並從 HTML 檔案中鏈結到它們。

選項:

覆寫全部:你可以覆寫整個主題並使用你的自訂檔案
覆寫內容:保留標題、頁腳、側邊欄等,只單純覆寫頁面或文章的內容部分
在內容上方:你的自訂內容會被放置在頁面內容的頂部
在內容下方:你的自訂內容會被放置在頁面內容的底部

新增自訂文章類型的支援

預設情況下,這個外掛可以處理頁面和文章,但你可以到設定中啟用它並支援任何其他已註冊的文章類型。

使用 hppp_post_types 過濾器添加更多文章類型。

像這樣:

public function post_type_modify ($post_types) {
$post_types[] = 'custom_post_type';
return $post_types;
}

add_filter( 'hppp_post_types', 'post_type_modify' );

原文外掛簡介

This plugin allows you to use any HTML or PHP file as the template for any page or post.
Simply upload the file and select it.
You can upload custom js and css files into the media library and link to them from the HTML file.
Options:

Overwrite All: You overwrite the entire theme and use your custom file
Overwrite Content: Keeps the header, footer, sidebar, e.t.c. Simply overwrites the body of the page or post
Above Content: Your custom content is simply added to the top of the page content
Below Content: You custom content is placed just beneath the page content.

Adding support for custom post types
By default the pulugin works with pages and posts, however, go to the settings to enable it on any other registered post type.
use the hppp_post_types filter to add more post types.
Like this:
public function post_type_modify ($post_types) {
$post_types[] = 'custom_post_type';
return $post_types;
}

add_filter( 'hppp_post_types', 'post_type_modify' );

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Custom HTML/PHP Post Templates」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | 1.1.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | trunk |

延伸相關外掛(你可能也想知道)

  • Custom post types, Custom Fields & more 》確實免費的 WordPress 外掛「自訂型態文章」可以讓您:, , 建立自訂型態文章, 建立自訂分類(例如:類別、標籤等等), 在型態文章上建立自訂欄位, 在分類上建...。
  • Login Page Customizer – Customizer Login Page, Admin Page, Custom Design 》自定義登錄頁面外掛可以讓您在登錄頁面上即時查看所有更改,並非常輕鬆地編輯它們。您可以在WordPress管理員登錄頁面上做出很多更改,如自定義登錄頁面標誌、...。
  • WP Page Templates 》, , 輕鬆為任何佈景主題創建自訂頁面模板。, , , 想要使用一個沒有全寬頁面模板的 WordPress 主題?使用 WP Page Templates,將任何模板添加到您的主題上。, ...。
  • Hide Header on Posts for Landing Pages 》, , 輕鬆將文章轉換為落地頁面, , , 在單篇文章頁面上隱藏標題, , , 在查看文章時移除標誌、菜單和整個頁面頂部, , , 無需代碼。只需在創建文章時啟用該選項...。
  • WooCommerce Product Page Templates 》, , 輕鬆建立 WooCommerce 產品的自訂頁面模板, , , 將產品頁面轉換為落地頁面, , , 想在產品頁面上添加左側或右側的側邊欄?這個外掛可以讓操作變得簡單。, ...。
  • WooCommerce Simple Frontend Manager 》從前端查看、編輯和創建 WooCommerce 產品, 你的 WooCommerce 商店是由其他人管理的嗎?也許你為客戶建立商店,, 或你的商店由員工或承包商管理, 或你想讓你...。
  • Ultimate Post Types 》Ultimate Post Types 為使用者提供一個易於管理自訂文章類型和分類法的介面。它完全使用 WordPress 文章類型和分類法 API 並涵蓋了建立文章類型、新增分類法...。
  • Taxonomy Templates 》Taxonomy Templates 外掛可以讓使用者像在設定頁面的選擇模板一樣,在可用的分類模板中選擇模板。, 當有更多的模板可用時,在編輯分類、標籤和任何自訂分類頁...。
  • Quick Location Maps 》這個外掛插入地圖至您的文章/頁面,使用基於 iFrame 的 Google Maps,無需任何 API。, 使用者可以設定精確的座標(緯度或經度)或輸入地址。若您想在文章中插...。
  • Custom-Single 》此外掛讓佈景主題能夠根據文章分類指定不同的single.php範本。由於文章可以有多個分類,因此它使用以下方式選擇可能的自訂範本:, 1)直接分配分類, R...。
  • Dynamic Template Parts 》總結:使用動態模板部件來管理 WordPress 網站的模板,這個強大的外掛擴展了全站編輯器,讓您根據您正在編輯的內容動態交換標頭、頁腳和其他模板部件 - 不再...。

文章
Filter
Mastodon