Support » Plugin: Custom Content Shortcode » Use IF check for ACF option page fields

  • I would like to use the IF statements with some Option Page fields, but can’t work out the correct syntax. Has anyone done this?

    I have styled these fields, but if there is no value, I don’t want the extra html to show as it includes extra padding and colors.

    My field is [field sidebar_event_title option=true]

    I have tried
    [if sidebar_event_title option=true]<h4 class="sidebar-eventtitle">[field sidebar_event_title option=true]</h4>[/if]

    &

    [if exists]<h4 class="sidebar-eventtitle">[field sidebar_event_title option=true]</h4>[/if]

    Any other ideas?

    Cheers,
    Robey

  • The topic ‘Use IF check for ACF option page fields’ is closed to new replies.