1. Home
  2. AccessAlly
  3. WordPress Themes
  4. Use Dynamic Conditions to Hide or Display Elementor Blocks

Use Dynamic Conditions to Hide or Display Elementor Blocks

You can use dynamic conditions to hide or display Elementor blocks.

The easiest way to show and hide content using AccessAlly’s tag-based permission shortcodes is to use a text/HTML block in Elementor. Unfortunately, this means you can’t take advantage of all of Elementor’s amazing array of blocks.

That’s where using an additional conditional display plugin called Dynamic Conditions comes in, and in this tutorial, you’ll see how to use AccessAlly’s conditional shortcodes on any Elementor block.

Step 1: Install the Dynamic Conditions Plugin for Elementor

Screenshot of Dynamic Conditions Plugin Page

The first thing you’ll need to do is install the free Dynamic Conditions plugin for Elementor. You will also need to be using Elementor Pro to take advantage of this conditional display plugin.

Step 2: Add a Block and Navigate to Advanced

Screenshot of Elementor Block Advanced Tab

While editing in Elementor, you’ll navigate or add the block you want to display conditionally based on an AccessAlly permission shortcode. Then click on the “Advanced” tab and go to Dynamic Conditions.

Step 3: Select “Shortcode” from the Dynamic Tag Dropdown

Screenshot of Selecting the Dynamic Tag Shortcode

Once you’ve selected Shortcode from the dropdown of Dynamic Tag options, you’ll be able to insert the AccessAlly shortcode.

Screenshot of the shortcode itself

The way you’ll construct your shortcode will depend on what you’re trying to test for. Please refer to the full AccessAlly shortcode guide.

The only difference from using the shortcode like you usually would is that you will put a certain string of text that you will test against inside the shortcode.

For example: [accessally_missing_any_tag tag_id=’200′]True[/accessally_missing_any_tag]

Here the word “True” will be used as a check to make sure that this person is missing the tag we’re checking for.

Step 4: Set the condition text to match

Screenshot of setting the conditions

Select “Show when condition is met”, and choose “Is Equal To” as the condition, and then put the same string of text that you put within your shortcode.

In our example, our string is “True”, so we put this exact string in the Conditional Value.

What this will do is compare that the two strings match, and if they do then you will be able to show or hide this block accordingly.

Step 5: Enable Debug Mode and Test

Screenshot of debug mode button

Enable debug mode and visit your page to test the results of your shortcode. If the condition is met, then you should see the block appear or disappear depending on what you’re trying to accomplish.

Screenshot of debug info

ACCESSALLY DOES NOT PROVIDE TECHNICAL SUPPORT FOR THIS FEATURE/PLUGIN.

Please note that this is advanced functionality and should be attempted with care.

For any help, please contact the creators of the Dynamic Conditions plugin directly.

Updated on October 12, 2020

Was this article helpful?

Related Articles

NO QUESTION GOES UNANSWERED

If you have any questions, we're just an email away.

We take your success seriously, and you'll always get a speedy reply from a real person during business hours.

Opt-In-Laptop.png

AccessAlly is the #1 WordPress Course and Membership Solution for Industry Leaders

WATCH THE DEMO

You'll get follow-up emails about AccessAlly and new features. Opt out anytime. Full privacy policy here.