Support

Account

Home Forums ACF PRO Conditionial frontend output

Helping

Conditionial frontend output

  • Hi,

    This should be super simple, but after much searching, I still couldn’t figure it out:

    How can I make the output of a field in the frontend conditional?
    The condition would be the content of another field, such as a checkbox or date fields.

    Each field has a setting for Conditional Logic, but that seems to affect only visibility in the backend.

    On this particular site I’m working on, I’m using WPBakery, but that shouldn’t really matter.

    Thanks!
    Ralf

  • Actually, using a page builder like WPBakery will make a big difference. conditionally showing a value based on another value will require custom php code or some type of coding option or conditional templating tags provided by the builder. I cannot give you any information on how to use your page builder, for that you would need to contact support for that page builder of find a user forum where you can ask for help with the page builder.

    Using PHP code would look something like this

    
    if (get_field('not_this_field') == 'some_value') {
      the_field('this_field');
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.