Support

Account

Home Forums General Issues Display backend checkbox to show or hide content

Helping

Display backend checkbox to show or hide content

  • Hey there everyone, I wonder if someone can help me with this.

    I would like to add a custom field for every wordpress page, which is just a checkbox and nothing more.
    If this checkbox is set to true, i want to show a div in the footer, if it is set to false, i don’t want to show it.
    I’ve tried to find how to do this but there doesn’t seem to be anything i can understand that explains how to do this clearly.
    I hope someone will be able to help me with this.

    Thanks in advance.

  • Hey Vancha,

    You just need to pass a filter on your footer file, something like:

    if(get_field("field_key_xxxx"){
       echo "[xxxxxxxxx]";
    }

    I recommend you to use the “true/false” field type for this

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

You must be logged in to reply to this topic.