[WordPress] 外掛分享: IF AS Shortcode

首頁外掛目錄 › IF AS Shortcode
10+
安裝啟用
★★★★★
5/5 分(2 則評價)
587 天前
最後更新
問題解決
WordPress 4.0+ PHP 5.6+ v1.2 上架:2016-09-15

內容簡介

此外掛可讓您在任何文章類型、選單和小工具中添加條件限制內容,並使用簡碼代碼而不需要使用 PHP 或其他語言:)

文章/頁面/其他文章類型:

創建新內容,並在上方的 TinyMCE 編輯器中找到一個名為「IF」的按鈕。
點擊「IF」按鈕,選擇您需要在內容區域中使用的條件。
您可以選擇真正的區塊,並在 else 區塊中編寫其他內容。
保存您的內容以並發佈它!

選單:

點擊左側的「外觀」
從中選擇「選單」頁面。
您必須為每個選單顯示描述字段,方法如下:
點擊選單頁面上方的「屏幕選項」。
從該選項選擇「描述」。
現在您可以從「簡碼」選項卡中添加限制內容。

小工具:

點擊左側的「外觀」
從中選擇「小工具」頁面。
現在您有一個名為「受限內容」的框。
您可以將它移動到任何側邊欄中並填寫表單。

翻譯

阿拉伯文
英文

條件的列表

[if current_user_can capability=”administrator”]True content[else]False content[/if]
[if current_user_can capability=”editor”]True content[else]False content[/if]
[if current_user_can capability=”author”]True content[else]False content[/if]
[if current_user_can capability=”contributor”]True content[else]False content[/if]
[if current_user_can capability=”subscriber”]True content[else]False content[/if]
[if is_user_logged_in]True content[else]False content[/if]
[if has_post_thumbnail]True content[else]False content[/if]
[if comments_open]True content[else]False content[/if]
[if has_tag]True content[else]False content[/if]
[if is_attachment]True content[else]False content[/if]
[if has_excerpt]True content[else]False content[/if]
[if pings_open]True content[else]False content[/if]
[if is_home]True content[else]False content[/if]
[if is_rtl]True content[else]False content[/if]

示例

顯示登錄後的內容
[if is_user_logged_in]
歡迎
[else]
您必須登錄才能查看此內容
[/if]

外掛標籤

開發者團隊

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

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

原文外掛簡介

This is plugin help you to add conditions inside any post types, menus, and widgets to restrict the content by use shortcode without use php code or other language :).
Posts/Pages/Other Post Types :

Create new content and in above tinymce editor you will see button it’s name is “IF”.
Click “IF” button and choose the condition you need to use inside content area.
You can select the true block and write otherwise inside else block.
Save your content and publish to see it!

Menus :

Click in left side “Appearance”
Choose from it “Menus” page.
You must show description field for every menu by this way :
Click “Screen Options” up the menu page.
Chack “Description” from that tab.
Now you can add your restrict content from “Shortcode” tab.

Widgets :

Click in left side “Appearance”
Choose from it “Widgets” page.
Now you have box it’s name “The restricted content”.
You can move it to any sidebar and fill the felids.

Translations

Arabic
English

List of conditions

[if current_user_can capability=”administrator”]True content[else]False content[/if]
[if current_user_can capability=”editor”]True content[else]False content[/if]
[if current_user_can capability=”author”]True content[else]False content[/if]
[if current_user_can capability=”contributor”]True content[else]False content[/if]
[if current_user_can capability=”subscriber”]True content[else]False content[/if]
[if is_user_logged_in]True content[else]False content[/if]
[if has_post_thumbnail]True content[else]False content[/if]
[if comments_open]True content[else]False content[/if]
[if has_tag]True content[else]False content[/if]
[if is_attachment]True content[else]False content[/if]
[if has_excerpt]True content[else]False content[/if]
[if pings_open]True content[else]False content[/if]
[if is_home]True content[else]False content[/if]
[if is_rtl]True content[else]False content[/if]

Example

Show content for who logged in
[if is_user_logged_in]
Welcome
[else]
You must login to see this content
[/if]

延伸相關外掛

文章
Filter
Apply Filters
Mastodon