L
L
Lord_Dantes2018-09-26 18:47:37
WordPress
Lord_Dantes, 2018-09-26 18:47:37

How to get true/false value in post?

Good day ..
Straight to the point, let's say we have posts
5bab97a92bb4c186581918.png
They have a spark icon on the right like "Hot job", what needs to be done ...
With the help of the ACF plugin, I use the input field of the "Yes / No" type, that is, through If
It is necessary that in the admin panel you can check the box if there is a burning vacancy and leave it empty and the light would be removed.
How can I do this .. lost hope while searching for 3 and a half hours already spent ..
Either I searched badly or I'm just stupid
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
id_baton4eg, 2018-09-26
@Lord_Dantes

very simple

if(get_field('ИД_ПОЛЯ', $post->ID) == true) {
//ОГОНЕК ПОКАЖИСЬ
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question