Test for values in shortcodes for Advanced Custom Fields
As of Woo360 Themer 1.1, you can test the field connection shortcodes for the following Advanced Custom Fields (thirdparty plugin) with these operators:

Text, Email, or Urltype fields
Test if the value equals or doesn't equal a text string you specify. 
Number field
Test if the value equals, doesn't equal, is greater than, greater than or equal to, less than, less than or equal to an integer you specify.
Warning: When you use a value test, make sure the fields you're evaluating have a value. If the field is empty, the value test will always return FALSE. For example, if you're testing whether the field equals the string "abc" and the field is empty, an EQUALS test returns FALSE, and a NOTEQUALS test also returns FALSE. The best way to ensure the field has a value is to make it a required field.
The syntax is the same as for the standard Themer BooleanIf and the ifelse conditional shortcode statements (see the Related Articles below), with extra parameters exp
and value
:
[wpbbif somefieldconnectionshortcode exp='<operator>' value='<value>'] Display this text when the value test is true.[wpbbelse]Display this text when the value test is false.[/wpbbif]
For Text, Email, and Url fields, you can use the following exp
parameter values.
equals
notequals
For the Number field, you can use the following exp
parameter values.
equals
notequals
greater
greaterequals
less
lessequals
The value
parameter is the value that you want to test for.
Notes:
 When the value of
exp
isgreater
,greaterequals
,less
, orlessequals
, both the Number field value and the value you're testing for in the value parameter are converted to integers before they're compared, butequals
andnotequals
compare the exact strings that are there. So, for example, if you're testing whether 377.78 is LESSEQUALS 377.77, the result is TRUE, because both values are converted to 377 before comparison occurs, so they are equal. On the other hand, if you test whether 377.77 EQUALS 377.78, the result is FALSE. because the two strings are being compared as is.  The EQUALS test for URLs ignores the trailing slash if there is one, in both the field value and the comparison value. For example, https://example.com and https://example.com/ will return TRUE to the EQUALS test.
 The
value
parameter is casesensitive.
Examples of testing ACF
The following examples of conditional shortcode statements were inserted into an HTML module in a Singular Themer layout. They were constructed so the shortcode value would be displayed, as well as whether the test for the value is true or false. The following custom fields were created for these tests using the Advanced Custom Fields plugin.

string_value
(type Text) 
number_value
(type Number) 
email_address
(type Email) 
pro_link
(type Url, a type only available in the Pro version)
Look at the output in each example to help understand the code.
1 ACF Text field EQUALS example
1 Text field equals test<br>[wpbbif post:acf type='text' name='string_value' exp='equals' value='try me out']True: ACF field called string_value equals the test value "try me out".<br>string_value is "[wpbb post:acf type='text' name='string_value']"[wpbbelse]False: ACF field called string_value does not equal the test value "try me out".<br>string_value is "[wpbb post:acf type='text' name='string_value']"[/wpbbif]
Output:
2 ACF Text field NOTEQUALS example
2 Text field notequals test<br>[wpbbif post:acf type='text' name='string_value' value='try' exp='notequals'] True: The ACF field string_value does not equal the test value "try".<br> string_value is "[wpbb post:acf type='text' name='string_value']" [wpbbelse] False: The ACF field string_value does not equal the test value "try"<br> string_value is "[wpbb post:acf type='text' name='string_value']"[/wpbbif]
Output:
3 ACF Number field LESS example
3 ACF Number field less test<br>[wpbbif post:acf type='number' name='number_value' exp='less' value='37809'] True: The ACF number_value field is less than 37809.<br> The number field value is [wpbb post:acf type='number' name='number_value'] [wpbbelse]False: The ACF number_value field isn't less than 37809. .<br> The number field value is [wpbb post:acf type='number' name='number_value'][/wpbbif]
Output:
4 ACF Number field GREATER example
4 ACF Number field greater test<br>[wpbbif post:acf type='number' name='number_value' exp='greater' value='378'] True: The number field value is greater than 378.<br> The number field value is [wpbb post:acf type='number' name='number_value']. [wpbbelse] False: The number field value isn't greater than 378.<br> The number field value is [wpbb post:acf type='number' name='number_value'].[/wpbbif]
Output:
5 ACF Number field GREATEREQUALS example
5 ACF Number field greaterequals test<br>[wpbbif post:acf type='number' name='number_value' exp='greaterequals' value='378'] True: The number field value is greater than or equals 378.<br> The number field value is [wpbb post:acf type='number' name='number_value']. [wpbbelse] False: The number field value isn't greater than or equals 378.<br> The number field value is [wpbb post:acf type='number' name='number_value'].[/wpbbif]
Output:
6 ACF Number field NOTEQUALS example
Remember the EQUALS and NOTEQUALS comparisons don't convert number values into integers first, so the comparison is for an exact match of two strings.
6 ACF Number field notequals test<br>[wpbbif post:acf type='number' name='number_value' exp='notequals' value='377'] True: The number field value does not equal 377.<br> The number field value is [wpbb post:acf type='number' name='number_value']. [wpbbelse] False: The number field value equals 377.<br> The number field value is [wpbb post:acf type='number' name='number_value'].[/wpbbif]
Output:
7 ACF Email field EQUALS test
Remember that if a field is empty, both the EQUALS test and NOTEQUALS test return FALSE.
7 ACF Email field equals test<br>[wpbbif post:acf type='email' name='email_address' exp='equals' value="fred@example.com"]True: ACF field email_address equals test value "fred@example.com".<br>email_address is "[wpbb post:acf type='email' name='email_address']"[wpbbelse]False: ACF field email_address doesn't equal test value "fred@example.com".<br>email_address is "[wpbb post:acf type='email' name='email_address']"[/wpbbif]
Output:
8 ACFPro URL EQUALS example
Remember that the trailing slash is ignored in both the field and the comparison values.
8 ACFPro URL field EQUALS test<br>[wpbbif post:acf type='url' name='pro_link' exp='equals' value='https://buildlebanontrails.com/']True: pro_link field equals test value "https://buildlebanontrails.com/".<br>pro_link is "[wpbb post:acf type='url' name='pro_link']"[wpbbelse]False: pro_link doesn't equal test value "https://buildlebanontrails.com/".<br>pro_link is "[wpbb post:acf type='url' name='pro_link']"[/wpbbif]
Output: