Support » Plugin: Custom Content Shortcode » true/false type fileds in ACF

  • Resolved NuriaSerrat

    (@nuriaserrat)


    I love this plguin. Lots of thanks.

    I’m looking for a way to use [content] in posts that displays true/false type fields from ACF.

    I’m using another field value in true cases and I need to put some text in false ones . I’m thinking in something that displays the field value only if it’s true.

    May be there is a easy way to do it… I’m not a developer.

    Thanks again

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Yes, I believe checking a true/false field is possible. For example, if the field is named condition:

    [loop type="post"]
        [if flag="condition"]
            The condition is true.
        [/if]
        [if no_flag="condition"]
            The condition is false.
        [/if]
    [/loop]

    Please let me know if that works for you.

    Thanks!
    Its good, but I would like use it outside the loop. Just in one post template. I’m not sure if its possible. I’m just displaying the values of custom fields. I’m going to check it.

    thanks anyway.

    Plugin Author Eliot Akira

    (@miyarakira)

    In the latest update, I made sure that [if flag] works both in and outside the loop.

    great!! It works perfect!
    Lots of thanks. Good job, always quick, always simple, always perfect!
    Congratulations

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘true/false type fileds in ACF’ is closed to new replies.