jaidenf
Forum Replies Created
-
SOLUTION: I created my own conditional shortcodes that read the query param amount. Code is below with a shortcode example (make sure your query data string is correct in FF and shortcode).
[show_if param=”score_total” operator=”greater_equal” value=”10″]
Over 10
[/show_if]function display_content_based_on_query($atts, $content = null) {
$param_name = isset($atts['param']) ? sanitize_text_field($atts['param']) : '';
$param_value = isset($_GET[$param_name]) ? sanitize_text_field($_GET[$param_name]) : '';
if (!$param_name || $param_value === '') {
return ''; // Hide content if parameter is missing
}
$operator = isset($atts['operator']) ? $atts['operator'] : 'equals';
$value = isset($atts['value']) ? sanitize_text_field($atts['value']) : '';
$should_show = false;
switch ($operator) {
case 'greater':
$should_show = ((float)$param_value > (float)$value);
break;
case 'greater_equal':
$should_show = ((float)$param_value >= (float)$value);
break;
case 'less':
$should_show = ((float)$param_value < (float)$value);
break;
case 'less_equal':
$should_show = ((float)$param_value <= (float)$value);
break;
case 'not_equals':
$should_show = ($param_value != $value);
break;
case 'contains':
$should_show = (strpos($param_value, $value) !== false);
break;
case 'not_contains':
$should_show = (strpos($param_value, $value) === false);
break;
case 'equals':
default:
$should_show = ($param_value == $value);
break;
}
return $should_show ? do_shortcode($content) : '';
}
add_shortcode('show_if', 'display_content_based_on_query');Is there any way around this? I’m happy to figure out the code if that’s needed.
Another workaround I could do, is create a elementor template (with the conditional shortcode) and add it’s shortcode on confirmation page. But it seems fluent forms strip all the styles and code from it?
Figured it out! Whoo.
Make sure you set up page categories. Then head to Yoast > Search Appearance > Breadcrumbs > Taxonomy to show in breadcrumbs for content types > Pages > Add what you need.
Forum: Plugins
In reply to: [Animate It!] Make animations work togetherAlso, is there a way to delay a pages exit?
For example a button is clicked, I don’t want the page to change until all the animations have been played (eg 2 seconds).