PluginSift
PluginsThemesCompare
Directory
  • Plugins
  • Themes
  • Compare Plugins
Plugin Comparisons
  • SEO
  • Security
  • Ecommerce
  • Page Builders
  • Caching
  • Backup
  • Forms
  • Analytics
Resources
  • About
  • Contact
  • llms.txt

© 2026 PluginSift. Data sourced from WordPress.org. · [email protected]

  1. Home
  2. Plugins
  3. If
  4. If Shortcode
If Shortcode icon

If Shortcode

This plugin provides an [if] shortcode to conditionally render content.

By geomagas·If·Free
5(6 reviews)
·200 active installs·Updated 1 year ago
DownloadCompare

As of April 2026, If Shortcode is a WordPress if plugin with 200 active installations and a 5/5 rating from 6 reviews. It has been downloaded 4.9K+ times in total. Requires WordPress 3.0.1+ and PHP 5.4+. Available on WordPress.org since 2014. Last updated 1 year ago — may have compatibility concerns. Top alternative: VK Dynamic If Block.

5/56 reviews
200active installs
4.9K+total downloads
12 yearssince 2014

Overview

This plugin provides an [if] shortcode to conditionally render content. The syntax is the following:

[if condition1 condition2=false condition3]{content}[/if]

Conditions are passed as attribute names. Multiple conditions evaluate to the result of ORing all of them. In other words, if at least one condition evaluates to the desired boolean result, {content} is rendered, otherwise it is discarded.
Attribute values determine if we want the condition to be true or false. A value of '0', 'false', '' (the empty string), 'null' or 'no' means we expect the condition to be false. Anything else, including the absense of a value, is interpreted as true.

For example, suppose that we want to include a sentence in a post, but only for anonymous visitors:

[if is_user_logged_in=no]The Sentence.[/if]

It…

Read full description on WordPress.org

Ratings & Reviews

56 reviews
5 ★
6
4 ★
0
3 ★
0
2 ★
0
1 ★
0

Compatibility

WordPress3.0.1+ requiredTested up to 6.6.5
PHP5.4+ required

Top Alternatives to If Shortcode

VK Dynamic If Block icon
VK Dynamic If Block
53.0K+ installsUpdated 2 weeks ago
ViewCompare
Optional Content icon
Optional Content
540 installsUpdated 14 years ago
ViewCompare
Conditions for Texts (Dynamic Content) icon
Conditions for Texts (Dynamic Content)
010 installsUpdated 7 years ago
ViewCompare
IF AS Shortcode icon
IF AS Shortcode
510 installsUpdated 1 year ago
ViewCompare
View all if plugins →

Frequently Asked Questions

Changelog

0.3.0

  • Improvement: Refactored code for PHP 5.4+
  • Addition: Added some more tags
View full changelog on WordPress.org

Contributors

geomagasgeomagas
Plugin Info
Version
0.3.0
Last Updated
Aug 2, 2024
WP Requires
3.0.1+
Tested Up To
6.6.5
PHP Requires
5.4+
Active Installs
200
Downloads
4.9K+
Added
Mar 2, 2014
Business
Free

Tags

ifelseshortcodeconditionalconditional-tags

Developer

G
geomagas
1 plugins0.0M+ total installs
View all plugins →

Quick Compare

If Shortcode vs VK Dynamic If Block→If Shortcode vs Optional Content→If Shortcode vs Conditions for Texts (Dynamic Content)→

Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.