D
D
Dmitry Markov2019-12-24 15:24:51
css
Dmitry Markov, 2019-12-24 15:24:51

How to display fields generated in function php?

On my multisite, I decided to make one field for all subdomains. To do this, I wrote an instruction for the fields in function.php.

if( function_exists('acf_add_local_field_group') ) {
  acf_add_local_field_group($array);
}

The fields in the admin panel appeared, but I can't figure out how I can display them. In the usual way "get_field" I get null. In the database, the fields are filled in the wp_options table with the name acf_network_options_fieldName.
Any ideas?
Important point! Doesn't work with options_page type only

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FeST1Val, 2019-02-20
@gorilalopster

If I understood correctly ... something like this ... correct the current for yourself, I hastily wrote as an example to understand the logic will go)))

M
mr_molodoy, 2019-02-20
@mr_molodoy

Have a look at jQuery's toggleClass method.
There are also examples.
api.jquery.com/toggleclass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question