Home Forums General Issues True / False field doesn’t appear


True / False field doesn’t appear

  • Hello,

    I’m starting to build my website. I use ACF to help me on my task, all works good. I enjoy to use this plugin, but I have a question for a field. I use true/false on my page for a field and the php code generate by this plugin doesn’t appear on my website.

    I don’t understand why, I activate my field and read this code:

                <?php echo "<strong>Traduction française:</strong>"; if ( get_field( 'traduction_francaise' ) == 1 ) { 
                 // echo 'true'; 
                } else { 
                // echo 'false'; 
                }  ?> 

    whatever I choose, nothing appear on my website, if true it must appear “oui” and false “non”. But I have nothing. Why?

    PS: sorry I’m french, I hope you understand my english ^^

  • I found why it doesn’t work…

    I post here so fast i don’t saw the code generate by ACF… I change //echo by echo and it works.

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

The topic ‘True / False field doesn’t appear’ is closed to new replies.