A
A
Alexander Sobolev2018-06-01 15:49:05
WordPress
Alexander Sobolev, 2018-06-01 15:49:05

How to display option name of wordpress plugin?

You need to display the name of the plugin option.
Not tricky manipulation outputs the value of the option.

$all_options = get_option('kpk_cost_calc_options'); echo $all_options['wall_electric_boiler'];

Through the print_r of the options array, I realized that there is no $tite in the array. The id and value are displayed.
When adding the title option, specify:
add_settings_field( 'wall_electric_boiler', 'Котел настенный электрический', 'kpk_cost_calc_option_display_settings', $kpk_cost_calc_page, 'kpk_cost_calc_section_boiler', $kpk_cost_calc_field_params );

Question: How to get it to display option name : option value ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question