редукционная структура opt_text не отображает значение

я устал это исправлять
у меня есть проблема с опциями структуры редукса
Варианты-init.php

    Redux::setSection( $opt_name, array(
'title'  => __( 'Basic Field', 'redux-framework-demo' ),
'id'     => 'basic',
'desc'   => __( 'Basic field with no subsections.', 'redux-framework-demo' ),
'icon'   => 'el el-home',
'fields' => array(
array(
'id'       => 'opt-text',
'type'     => 'text',
'title'    => __('Text Option - Email Validated', 'redux-framework-demo'),
'subtitle' => __('This is a little space under the Field Title in the Options table, additional info is good in here.', 'redux-framework-demo'),
'desc'     => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
'validate' => 'email',
'msg'      => 'custom error message',
'default'  => 'test@test.com'
)
)
) );

это мое index.php

<h1><?php global $opt_name; echo 'Text value: ' . $opt_name['opt-text']; ?></h1>

я получаю эту ошибку
Предупреждение: недопустимое смещение строки ‘opt-text’ в C: \ xampp \ htdocs \ wordpress \ wp-content \ themes \ ZoXX \ index.php в строке 2

0

Решение

Redux еще не загрузился. Задержите использование переменной или запустите:

Redux::init('OPT_NAME')

Удачи!

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru