Title: Logic Shortcodes
Author: Samuel Diethelm
Published: <strong>2016 年 4 月 19 日</strong>
Last modified: 2016 年 4 月 28 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/logic-shortcodes.svg)

# Logic Shortcodes

 由 [Samuel Diethelm](https://profiles.wordpress.org/samueldiethelm/) 開發

[下載](https://downloads.wordpress.org/plugin/logic-shortcodes.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/logic-shortcodes/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/logic-shortcodes/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/logic-shortcodes/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/logic-shortcodes/#developers)

 [技術支援](https://wordpress.org/support/plugin/logic-shortcodes/)

## 外掛說明

This plugin enables the use of [if] shortcodes to work with conditional logic based
on the existence of post meta or taxonomy terms on posts and pages.

Please consider taking a minute to rate the plugin or let me know any feature request.
Thanks!

#### Taxonomy

With conditional logic for taxonomy terms, you can use names, slugs or term_ids:

 * [if taxonomy=”category” slug=”cars”]Content to show[/if]
 * [if taxonomy=”category” name=”Cars”]Content to show[/if]
 * [if taxonomy=”category” id=”123″]Content to show[/if]

#### Post Meta

Post meta (or custom field) logic can be used to check if a certain meta_key AND
meta_value combination are present or just a meta_key:

 * [if postmeta=”car_model”]Content to show if car model info is present[/if]
 * [if postmeta=”car_model” value=”Tesla Model S”]Content to show if car model is
   Tesla Model S[/if]

## 安裝方式

 1. Upload the plugin files to the `/wp-content/plugins/` directory, or install the
    plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress

## 常見問題集

  Where can I use the logic?

Anywhere where shortcodes are accepted and a post or page is being displayed.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Logic Shortcodes〉的開發相關工作。

參與者

 *   [ Samuel Diethelm ](https://profiles.wordpress.org/samueldiethelm/)

[將〈Logic Shortcodes〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/logic-shortcodes)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/logic-shortcodes/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/logic-shortcodes/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/logic-shortcodes/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/logic-shortcodes/)。

## 變更記錄

#### 1.0

 * Initial upload

## 中繼資料

 *  版本 **1.0**
 *  最後更新 **10 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 2.5.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **5.4.21**
 *  語言
 * [English (US)](https://wordpress.org/plugins/logic-shortcodes/)
 * 標籤:
 * [conditional](https://tw.wordpress.org/plugins/tags/conditional/)[logic](https://tw.wordpress.org/plugins/tags/logic/)
   [postmeta](https://tw.wordpress.org/plugins/tags/postmeta/)[taxonomy](https://tw.wordpress.org/plugins/tags/taxonomy/)
   [term](https://tw.wordpress.org/plugins/tags/term/)
 *  [進階檢視](https://tw.wordpress.org/plugins/logic-shortcodes/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/logic-shortcodes/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/logic-shortcodes/reviews/)

## 參與者

 *   [ Samuel Diethelm ](https://profiles.wordpress.org/samueldiethelm/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/logic-shortcodes/)