#
Extended
The following shortcodes can be used periodically in any Solodev website to add additional functionality and customization. They offer advanced features such as Google Search integration, YouTube embeds, and various other enhancements.
#
Conditionals
Provides functionality to add a conditional statement to the template. Much like standard if/else statements, the [cond]
shortcodes allows the user to create conditional statements with little coding knowledge.
Attributes:
Shortcode:
[cond]
Code Example:
[cond type=is subject="%3" value=0] code goes here… [/cond]
#
Sub Conditional
Operates much like an if/else or else statement. It is the child of the parent conditional statement.
Attributes:
Shortcode:
[sub_cond]
Code Example:
[cond type=is subject="%3" value=0]
[sub_cond type=is_not subject="" value=0]
</div>
<div class="row">
[/sub_cond]
[/cond]
#
Is Set
Verifies that a given variable is set. For example, is_set can be used to verify if a user variable is set, such as active, and execute functions accordingly.
Shortcode:
[is_set]
Code Example:
[is_set value=""]
<img alt="" class="img-thumbnail img-responsive" src="[get_asset_file_url id=]">
[/is_set]
#
Is Empty
Verifies that a given variable is empty. For example, is_empty can be used to verify is a user variable empty and execute functions accordingly.
Attributes:
Shortcode:
[is_empty]
Code Example:
[is_empty value=""]
<img alt="" class="img-thumbnail img-responsive" src="/core/fileparse.php/268/urlt//placehold.it/360x245">
[/is_empty]
#
Value Set
Verifies that a specified value set.
Attributes:
Shortcode:
[value_isset]
Code Example:
<div landing-section-firstContent">
<h1 class="landing-h1">[value_isset default="" override=""]</h1>
</div>
#
Random
Returns a random number.
Attributes:
Shortcode:
[random]
Code Example:
[random min = 3 max = 7] (prints a random number between 3 and 7 that includes 3 and 7).
#
Month Filter
Month filter from January to December.
Attributes:
Shortcode:
[month_filter]
Example Code:
<div class="row">
<div class="col-md-4 form-group">
[month_filter class="month_filter"]
</div>
</div>
#
Login/Logout
Creates a link to log in or log out of a given session.
Attributes:
Shortcode:
[login_logout_link]
Example Code:
[login_logout_link logout_redirect="/contact/" login_page="/welcome/"]