子菜单未在ReduxFramework中打开

时间:2019-01-09 11:28:04

标签: wordpress wordpress-theming

我正在为WordPress开发一个主题,并且正在将reduxframework用于开发主题面板。当我将admin文件夹实现为主题并设置路径时,我在浏览器中打开了WordPress网站并打开了主题面板,但是没有打开子菜单。

请注意代码没有变化。

这是我在本代码小节中的代码,不在管理员端显示

    Redux::setSection( $opt_name, array(
    'title' => __( 'Basic Fields', 'redux-framework-demo' ),
    'id'    => 'basic',
    'desc'  => __( 'Basic fields as subsections.', 'redux-framework-demo' ),
    'icon'  => 'el el-home'
) );

Redux::setSection( $opt_name, array(
    'title'      => __( 'Heder', 'redux-framework-demo' ),
    'desc'       => __( 'Custom Logo' ),
    'id'         => 'Header-setting',
    'subsection' => true,
    'fields'     => array(
        array(
            'id'       => 'logo',
            'type'     => 'media',
            'url'      =>true,
            'title'    => __( 'Custom Logo', 'redux-framework-demo' ),
            'desc'     => __( 'Field Description', 'redux-framework-demo'),
            'default'  => 'Your Logo',
        ),

    )
) );
Redux::setSection( $opt_name, array(
    'title'      => __( 'Footer', 'redux-framework-demo' ),
    'desc'       => __( 'Footer copyright' ),
    'id'         => 'footer-setting',
    'subsection' => true,
    'fields'     => array(
        array(
            'id'       => 'copyright-footer',
            'type'     => 'textarea',
            'title'    => __( 'footer copyright', 'redux-framework-demo'),
            'desc'     => __( 'footer copyright', 'redux-framework-demo'),
            'default'  => 'Site is copyright by company',
        ),
    )
) );

1 个答案:

答案 0 :(得分:0)

尝试

   Redux::setSection( $opt_name, array(
    'title' => __( 'Basic Fields', 'redux-framework-demo' ),
    'id'    => 'basic',
    'icon'  => 'el el-home'
) );

Redux::setSection( $opt_name, array(
    'title'      => __( 'Heder', 'redux-framework-demo' ),
    'desc'       => __( 'Custom Logo' ),
    'id'         => 'Header-setting',
    'subsection' => true,
    'fields'     => array(
        array(
            'id'       => 'logo',
            'type'     => 'media',
            'url'      =>true,
            'title'    => __( 'Custom Logo', 'redux-framework-demo' ),
            'desc'     => __( 'Field Description', 'redux-framework-demo'),
            'default'  => 'Your Logo',
        ),

    )
) );
Redux::setSection( $opt_name, array(
    'title'      => __( 'Footer', 'redux-framework-demo' ),
    'desc'       => __( 'Footer copyright' ),
    'id'         => 'footer-setting',
    'subsection' => true,
    'fields'     => array(
        array(
            'id'       => 'copyright-footer',
            'type'     => 'textarea',
            'title'    => __( 'footer copyright', 'redux-framework-demo'),
            'desc'     => __( 'footer copyright', 'redux-framework-demo'),
            'default'  => 'Site is copyright by company',
        ),
    )
) );