WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
True False confusion (2 posts)

  1. phantomdentist
    Member
    Posted 2 years ago #

    I have had this issue with a few sites.

    I have created a true / false field. By default the field is unchecked (false) and I am using the following code

    <?php if( the_field('hide_next_previous_buttons') == false )
    		{ ?>
                <a href="#"></a>
                <a href="#"></a>
                <a></a>
                <a></a>
            <?php } ?>

    So the idea being if you tick the true false field, making it true, then the code above is not displayed.

    Instead the content of the if statement is always displayed, box ticked or not, and also when it is ticked a random number 1 is displayed after the code. Not sure if this is me making a mistake or a plugin issue?

    Cheers

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. elliotcondon
    Member
    Plugin Author

    Posted 2 years ago #

    use get_field for retrieving values / condition statements

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic