[WordPress] 外掛分享: Optional Content

首頁外掛目錄 › Optional Content
40+
安裝啟用
★★★★★
5/5 分(2 則評價)
5394 天前
最後更新
問題解決
WordPress 2.8.0+ v1.1 上架:2010-03-14

內容簡介

這個外掛讓你可以藉由簡單的短代碼來顯示或隱藏頁面或文章內容。你不需要 PHP 知識或啟用 PHP 外掛。只需要在所見即所得編輯器中使用一個按鈕,選擇在什麼情況下顯示內容。快速、簡單且安全。藉由刪除 PHP 邏輯,讓你的樣板文件保持乾淨。現在允許在條件內容中使用短代碼。

基於以下條件顯示內容:

手動開關設定
在特定時間之前、之後或之間顯示 (每天重複)
在特定日期之前、之後或之間顯示
基於訪客是否已登入
基於特定用戶 (透過使用者 ID) 或多個用戶指定顯示
基於 GET 變數 (以如 http://www.example.com/about/?test=value 為格式傳遞的變數,其中變數為 ‘test’)
基於 POST 變數 (透過表單發送的變數)
基於 REQUEST 變數 (GET 或 POST 變數)

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Optional Content」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin allows you to show or hide content on a page or post based on a simple shortcode. You don’t need PHP knowledge, or a PHP enabling plugin. Simply use a button on the WYSIWYG editor to select under what condition you would like the content displayed. Fast, simple, and safe. Keep your template files clean by removing your PHP logic. Now allows shortcodes inside of the conditional content.
Display content based on the following conditions:

Manual on/off setting
Before, after, or between specific times (repeated daily)
Before, after or between specific dates
Based on if the visitor is logged in
Based on a specific user (by user id) or multiple users (by user id)
Based on GET variables (variables passed on the URL in the form of http://www.example.com/about/?test=value where the variable is ‘test’)
Based on POST variables (variables sent via forms)
Based on REQUEST variables (either GET or POST variables)

延伸相關外掛

文章
Filter
Apply Filters
Mastodon