3.2 Card Conditional Logic

Table of Contents

When you are creating a guide for your customers, it should be created in the right way. Otherwise, the customer will get the wrong result. 

Thats why you have to setup proper card condition for specific guide. You can also see this video to setup the conditional logic with WP Guidant – 

To setup the card condition goes to the following path – ➡️ WordPress Dashboard > WP Guidant Dashboard.

Card conditional logic 1

From the dashboard you can see all the guides that you have already created for your site. Now choose a specific guide and click on the Manage Filter > Manage Cards.

Card items

Now click on the edit card button from the right-side option of the card.

Card Settings

Card Settings #

In the card settings you can change the card label, description and card images. Another powerful option is available called Condition Behavior. 

There are two different option available such as 

  • OR – Any of the conditions need to be matched. We know each card could have multiple conditions. Which means if any of the conditions matched the guide’s intent, it will show the result. We know each card could have multiple conditions.
  • AND – All conditions need to be matched. If the guide’s intent matched with all the card conditions, it will show the result. Otherwise, it will never show the result at all.

Card Condition #

We have reached the most important section. The card condition determines the result of the guide. A wrong selection can make the entire guide worthless.

Now navigate to the Card Condition > Create New Condition


First you have to choose the attribute of your card. As an attribute you can choose any of the sections of your site such as post category, title, date, etc. You can also choose WooCommerce related attributes.

WooCommerce Attributes

Secondly, the matching type is a very essential part of the card condition. Basically, it indicates how the intents will match with the card attributes and show the result.

Matching type
  • Equal – This type is used to compare two values to see if they are exactly the same. For example, select Equal matching type and a specific type of post category as value for the card. Let’s assume, we selected lifestyle post category as value. Now this card will only show those results that are listed exactly in lifestyle category.
  • Not equal – The type is used to check if two values are not the same. It’s often used in conditional statements to perform actions when a condition is not met.
  • Like – This matching is used to search for a specified pattern in a column. For example you want to show those post which are titled “WooCommerce” on the card result. You can choose this type.
  • Not like – Not like is the opposite of the like type. For example, you want exclude those posts from result which contains “Store” on their title.
  • Contains – This is often used when searching for content within posts, pages, or other elements on your WordPress site. For example, if you want to show all the posts on result that contain a specific keyword or phrase, you can use the “contains” in matching type.
  • Not Contains: This is the opposite of “contains” and is used when you want to exclude content that matches a specific criterion. For instance, if you want to find posts that do not contain a certain keyword or phrase, you can use “not contains” as matching type.
  • Greater than – Using this type means, when you’re asking WordPress to retrieve results with values greater than a specified number. For example, if you want to display posts in result with a custom field “price” greater than $50, you can use the matching type like this.
  • Less than – This type used to retrieve result with values less than a specified number. For example, If you want to find posts with a custom field “rating” less than 4, you can use this type.

Next option is value selection. For example, you selected “From WordPress Settings”. Now it will show the value based on your chosen attributes. Also, you can manually entry the value selection.
After choosing all the data click on the update button. Now your card will show the specific result that you want. We have created this card for our stores “Mugs category”.

After choosing this card let’s tap the show results button.

As you can see its showing us the exact result that we wanted.

Powered by BetterDocs