Answer the question
In order to leave comments, you need to log in
How to implement the choice of displaying the desired section from the admin panel through advanced custom field wordpress?
Good afternoon, how can I implement the choice of displaying the desired section from the admin panel through advanced custom field wordpress? for example, there are 3 sections and it is necessary that from the admin panel you can check which section to display from 3. How to do it correctly through acf
Answer the question
In order to leave comments, you need to log in
It's pretty simple...
1) create a true/false (yes/no) (ACF) field for 3 sections.
2) in the template do the check
<?php
$checkbox_1 = get_field('section_1');
if($checkbox_1):
// содержимое секции 1 тут
endif;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question