Support » Plugins » [Plugin: OptionTree] Is adding settings in Theme Mode from UI Builder possible?

  • Is it possible to use the OptionTree “Theme Options UI Builder” (in Admin > OptionTree > Settings) when using the plugin in Theme Mode?

    I have completely uninstalled the plugin and fully integrated it into a child theme.

    When I try to add settings from the “Theme Options UI Builder” it does not save. I can add fields from my custom “theme options” file with no problem.

    I would like to be able to use the “UI Builder” even in theme mode, if possible.

    I have the following settings for Theme Mode:

    // Optional: set 'ot_show_pages' filter to false.
    // This will hide the settings & documentation pages.
    add_filter( 'ot_show_pages', '__return_true' );	
    
    // Optional: set 'ot_show_new_layout' filter to false.
    // This will hide the "New Layout" section on the Theme Options page.
    add_filter( 'ot_show_new_layout', '__return_true' );
    
    // Required: set 'ot_theme_mode' filter to true.
    add_filter( 'ot_theme_mode', '__return_true' );
    
    // Required: include OptionTree.
    require_once( CHILD_DIR . '/option-tree/ot-loader.php' );
    
    // Required: include Theme Options.
    include_once( CHILD_DIR . '/lib/option-tree/theme-options.php' );

    http://wordpress.org/extend/plugins/option-tree/

Viewing 1 replies (of 1 total)
  • ThriveDigital

    (@thrivedigital)

    Hey,

    I’ve just installed Option Tree and it looks like the file theme-options.php will simply overwrite any changes you make using the UI Builder.

    Try commenting out the last line as follows:

    //include_once( CHILD_DIR . '/lib/option-tree/theme-options.php' );

    and that should allow you to add and save changes using the editor.

    Then when you’re done, you can simply change this line

    add_filter( 'ot_show_pages', '__return_true' );

    to

    add_filter( 'ot_show_pages', '__return_false' );

    to hide the UI Builder.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: OptionTree] Is adding settings in Theme Mode from UI Builder possible?’ is closed to new replies.