S
S
SergeyCorpus2020-06-03 18:40:19
WordPress
SergeyCorpus, 2020-06-03 18:40:19

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

1 answer(s)
O
Orkhan Hasanli, 2020-06-03
@azerphoenix

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;

https://www.advancedcustomfields.com/resources/tru...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question