Title: Conditional Tags Shortcode
Author: shazdeh
Published: <strong>जनवरी 28, 2015</strong>
Last modified: मे 26, 2020

---

प्लगिनहरू खोज्नुहोस्

यो प्लगिन **वर्डप्रेसका ३ प्रमुख नवीनतम रिलीजहरूसँग परीक्षण गरिएको छैन**। यो अब 
सम्भवतः व्यवस्थित वा समर्थन नभएको हुन सक्छ र वर्डप्रेसका नयाँ संस्करणहरूमा प्रयोग
गर्दा अनुकूलता सम्बन्धी समस्या हुन सक्छ।

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

# Conditional Tags Shortcode

 [shazdeh](https://profiles.wordpress.org/shazdeh/) द्वारा

[डाउनलोड गर्नुहोस्](https://downloads.wordpress.org/plugin/conditional-tags-shortcode.zip)

 * [विवरण](https://ne.wordpress.org/plugins/conditional-tags-shortcode/#description)
 * [समीक्षाहरू](https://ne.wordpress.org/plugins/conditional-tags-shortcode/#reviews)
 *  [स्थापना](https://ne.wordpress.org/plugins/conditional-tags-shortcode/#installation)
 * [विकास](https://ne.wordpress.org/plugins/conditional-tags-shortcode/#developers)

 [सहायता](https://wordpress.org/support/plugin/conditional-tags-shortcode/)

## विवरण

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]

## स्थापना

 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!

## समीक्षाहरू

![](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/) सेप्टेम्बर 3, 2016

Such a clever solution to create the code in a way that it doesn’t need to be updated
as it will accept all the conditional tags that wordpress provides. It will work
as long as wordpress don’t change their syntax …

 [ सबै 2 समीक्षाहरू पढ्नुहोस् ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/)

## योगदानकर्ता र डेभलपरहरू

“Conditional Tags Shortcode” खुला स्रोत सफ्टवेयर हो। निम्न व्यक्तिहरूले यो प्लगिनमा
योगदान गरेका छन्।

योगदानकर्ताहरू

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

[“Conditional Tags Shortcode” लाई आफ्नो भाषामा अनुवाद गर्नुहोस्](https://translate.wordpress.org/projects/wp-plugins/conditional-tags-shortcode)

### विकासमा रुचि छ?

[आरएसएस](https://plugins.trac.wordpress.org/log/conditional-tags-shortcode/?limit=100&mode=stop_on_copy&format=rss)
द्वारा [कोड ब्राउज गर्नुहोस्](https://plugins.trac.wordpress.org/browser/conditional-tags-shortcode/),
[एसभीएन रिपजिटरी](https://plugins.svn.wordpress.org/conditional-tags-shortcode/)
हेर्नुहोस्, वा [विकास लग](https://plugins.trac.wordpress.org/log/conditional-tags-shortcode/)
को सदस्यता लिनुहोस्।

## मेटा

 *  संस्करण **0.2**
 *  पछिल्लो अपडेट **6 वर्ष अघि**
 *  सक्रिय स्थापना **100+**
 *  वर्डप्रेस संस्करण ** 3.1 वा उच्च **
 *  जाँच गरिएको **5.4.19**
 *  भाषा
 * [English (US)](https://wordpress.org/plugins/conditional-tags-shortcode/)
 * ट्यागहरू
 * [conditional](https://ne.wordpress.org/plugins/tags/conditional/)[conditional-tags](https://ne.wordpress.org/plugins/tags/conditional-tags/)
   [context](https://ne.wordpress.org/plugins/tags/context/)[page](https://ne.wordpress.org/plugins/tags/page/)
   [shortcode](https://ne.wordpress.org/plugins/tags/shortcode/)
 *  [उन्नत दृश्य](https://ne.wordpress.org/plugins/conditional-tags-shortcode/advanced/)

## रेटिङ्गहरू

 ५ मा 5 तारा।

 *  [  2 5-तारा समीक्षाहरू     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=5)
 *  [  0 4-तारा समीक्षाहरू     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=4)
 *  [  0 3-तारा समीक्षाहरू     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=3)
 *  [  0 2-तारा समीक्षाहरू     ](https://wordpress.org/support/plugin/conditional-tags-shortcode/reviews/?filter=2)
 *  [  0 1-तारा समीक्षाहरू     ](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/)

## योगदानकर्ताहरू

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

## सहायता

केही भन्नु छ? सहयोग चाहियो?

 [सहायता फोरम हेर्नुहोस्](https://wordpress.org/support/plugin/conditional-tags-shortcode/)