Title: ACF Option=true
Last modified: April 27, 2021

---

# ACF Option=true

 *  [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years ago](https://wordpress.org/support/topic/acf-optiontrue/)
 * Back again with an issue 🙂
 * I’m having trouble getting IF statement to work with an ACF field that is in 
   an option page. `[if field=field_name option=true]` does not seem supported?
 * I also can’t make an IF statement work in a relationship field that is an option
   field, even though the related field I try to look for is not in an option page.
   Example
 *     ```
       [related related_field option=true count=3]
       [if field=field_name value=1]
       True
       [/if]
       [/related]
       ```
   
 * That does not work. I tried adding `option=false` to the IF statement as well,
   no luck

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [5 years ago](https://wordpress.org/support/topic/acf-optiontrue/#post-14371958)
 * Try:
 * `[if field=field_name value='1' option=true]`
 * If it does not work – use a var.
 *     ```
       [set myvar][field field_name option=true][/set]
       [if var=myvar value='1']
       Do what you want
       [/if]
       ```
   
 *  Thread Starter [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years ago](https://wordpress.org/support/topic/acf-optiontrue/#post-14376014)
 * Of course! var to the rescue whenever there’s an issue. First one didn’t work,
   second did. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ACF Option=true’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [finnfin](https://wordpress.org/support/users/finnfin/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/acf-optiontrue/#post-14376014)
 * Status: not resolved