Title: Conditional Tags Shortcode
Author: shazdeh
Published: <strong>Ṣẹrẹ 28, 2015</strong>
Last modified: Èbìbí  26, 2020

---

Ṣàwárí àwọn plugin

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://s.w.org/plugins/geopattern-icon/conditional-tags-shortcode.svg)

# Conditional Tags Shortcode

 Láti ọwọ́ [shazdeh](https://profiles.wordpress.org/shazdeh/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/conditional-tags-shortcode.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/conditional-tags-shortcode/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/conditional-tags-shortcode/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/conditional-tags-shortcode/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/conditional-tags-shortcode/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/conditional-tags-shortcode/)

## Àpèjúwe

With this shortcode you can take control of where the content is displayed.

#### Usage

You can use all the [conditional tags](https://codex.wordpress.org/Conditional_Tags)
WordPress provides. Checkout examples below.

Show text only on the homepage:
 [if is_front_page] The text [/if]

Show text only on the About page of the site:
 [if is_page=”about”] The text [/if]

Show only on the category archive view:
 [if is_category] The text [/if]

You can add “not_” before the conditional tag to reverse the logic, example:
 Show
on all pages of the site except the homepage: [if not_is_front_page] The text [/
if]

#### OR

Using multiple parameters, the content is displayed when either of the conditions
are met (“OR” comparison), for example, show text on both category and tag archive
pages:
 [if is_category is_tag] The text [/if]

#### AND

To set multiple conditions you can nest the shortcode, for example show text only
on homepage AND if the user is logged in:
 [if is_user_logged_in][if is_front_page]
The text [/if][/if]

Show a link to wordpress.org site, only on single post pages and only on mobile 
devices:
 [if wp_is_mobile][if is_single] [WordPress](https://wordpress.org/) [/
if][/if]

#### has_term_{taxonomy}

You can use this to check if the current post in the loops belongs to a custom term
in the desired taxonomy. See: https://codex.wordpress.org/Function_Reference/has_term

Example, check if current post has the “jazz” term in the “genre” taxonomy:
 [if
has_term_genre=”jazz”] The text [/if]

## Ìgbéwọlẹ̀

 1. Upload the `menu-item-visibility` directory to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Enjoy!

## Àwọn àgbéyẹ̀wò

![](https://secure.gravatar.com/avatar/a790366fa6c15cb32ce4b1d394966884f896da397176b9df63af01430867f816?
s=60&d=retro&r=g)

### 󠀁[Brilliant](https://wordpress.org/support/topic/brilliant-591/)󠁿

 [Tina Hammar](https://profiles.wordpress.org/tina-hammar/) Ọwẹ́wẹ̀ 3, 2016

Such a clever solution to create the code in a way that it doesnÌtumọ̀ Yorùbá: ’
t need to be updated as it will accept all the conditional tags that wordpress provides.
It will work as long as wordpress donÌtumọ̀ Yorùbá: ’t change their syntax …

 [ Ka gbogbo àwọn àgbéyẹ̀wò 2 ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/)

## Àwọn Olùkópa & Olùgbéejáde

“Conditional Tags Shortcode” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí
ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

 *   [ shazdeh ](https://profiles.wordpress.org/shazdeh/)

[Túmọ̀ “Conditional Tags Shortcode” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/conditional-tags-shortcode)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/conditional-tags-shortcode/),
ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/conditional-tags-shortcode/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/conditional-tags-shortcode/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/conditional-tags-shortcode/?limit=100&mode=stop_on_copy&format=rss).

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **0.2**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 6 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **100+**
 *  Ẹ̀yà WordPress ** 3.1 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **5.4.19**
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/conditional-tags-shortcode/)
 * Àwọn àmì
 * [conditional](https://yor.wordpress.org/plugins/tags/conditional/)[conditional-tags](https://yor.wordpress.org/plugins/tags/conditional-tags/)
   [context](https://yor.wordpress.org/plugins/tags/context/)[page](https://yor.wordpress.org/plugins/tags/page/)
   [shortcode](https://yor.wordpress.org/plugins/tags/shortcode/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/conditional-tags-shortcode/advanced/)

## Àwọn ìbò

 5 lára àwọn ìràwọ̀ 5.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/)

## Àwọn Olùkópa

 *   [ shazdeh ](https://profiles.wordpress.org/shazdeh/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/conditional-tags-shortcode/)