GD > Dynamic Content
GD > Dynamic Content displays dynamic content using post fields.
GD > Dynamic Content can show text or links or even shortcodes.
Settings
GD > Dynamic Content has logic settings that allow you to choose which field to evaluate. Supply the condition, and the required value. If the condition is met, then the content will be displayed.
Example
Show something when the Package ID = 5
[gd_dynamic_content id="12″ key="package_id" condition="is_equal" search="5″]Show This When Package ID = 5[/gd_dynamic_content]
Post ID
- Leave this blank to use the current Post ID.
-
id=""
Field Key
- The key for the Custom Field you want to evaluate.
-
key="package_id"
Field Condition
- The condition you want to use to evaluate the Custom Field
- Options include:
-
condition="is_equal"
-
condition="is_not_equal"
-
condition="is_greater_than"
-
condition="is_less_than"
-
condition="is_empty"
-
condition="is_not_empty"
-
condition="is_contains"
-
condition="is_not_contains"
Value to match
- This value will be used with the condition set above to hide (default) or show the content if the condition is fulfilled.
Text
- This will be shown if the condition evaluates to true.
Examples
Show based on the Package ID
[gd_dynamic_content id="12″ key="package_id" condition="is_equal" search="5″]Show This When Package ID = 5[/gd_dynamic_content]
Show a Post Map on the details page based on the Package ID (5)
[gd_dynamic_content key="package_id" condition="is_equal" search="5″][gd_map width="100%" height="425px" maptype="ROADMAP" zoom="12″ map_type="post" marker_cluster="1″][/gd_dynamic_content]
Show the address if the Custom Field “Show my address” (key=”show_my_address”) is checked.
[gd_dynamic_content key="show_my_address" condition="is_not_empty"][gd_post_address show="icon-value" address_template="%%street%%, %%neigborhood%%, %%city%%, %%zip%%, %%region%%, %%country%% "]
[/gd_dynamic_content]
Hide the logo if a custom field with key=’show_logo’ is not checked.
[gd_dynamic_content key="show_logo" condition="is_not_empty"]
[gd_post_images type="image" slideshow="1″ show_title="1″ animation="slide" controlnav="1″ types="logo" fallback_types="0″]
[/gd_dynamic_content]