if else

If else shortcode

A shortcode that allows you to create conditional content. Beware: Do not for security purposes.

Attributes

‘comments_open’, default: 1 ‘is_404’, default: 1 ‘is_archive’, default: 1 ‘is_author’, default: 1 ‘is_category’, default: 1 ‘is_day’, default: 1 ‘is_dayofweek’, default: null, value separator: ‘|’, example: ‘mon|tue|wed|thu|fri|sat|sun’ ‘is_feed’, default: 1 ‘is_front_page’, default: 1 ‘is_home’, default: 1 ‘is_host’, default: null, value separator: ‘|’, example: ‘www.orcapia.com|orcapia.com’ ‘is_locale’, default: null, value separator: ‘|’, example: ‘en|en_GB|en_US|da_DK’ ‘is_month’, default: 1 ‘is_page’, default: 1 ‘is_search’, default: 1 ‘is_single’, default: 1 ‘is_singular’, default: 1 ‘is_sticky’, default: 1 ‘is_super_admin’, default: 1 ‘is_tag’, default: 1 ‘is_tax’, default: 1 ‘is_time’, default: 1 ‘is_user_logged_in’, default: 1 ‘is_year’, default: 1 ‘not_host’, default: null, value separator: ‘|’, example: ‘www.orcapia.com|orcapia.com’ ‘pings_open’, default: 1

Example

Code

[if pings_open]Ping is OPEN[else]Ping is CLOSED[/else][/if]

Source Output

Ping is CLOSED

Display Output

Ping is CLOSED