Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **************How to add theme option in wordpress with option-tree*********
- step 1: Download the option-tree plug-in from wordpress.org
- step 2: put the option tree plug-in folder in your theme
- step 3: Than create a folder name: inc in your theme directory and copy *demo-theme-options.php* file from this location>> option-tree/assets/theme-mode/demo-theme-options.php than past this in the inc foler and rename into *theme-option.php*.
- step 4: Now call the *ot-loader.php* and *theme-option.php* file in functions.php like bellow.......
- include_once( 'option-tree/ot-loader.php' );
- include_once( 'inc/theme-options.php' );
- step 5: copy bellow code in functions.php to active option-tree/theme-option...
- add_filter( 'ot_show_pages', '__return_true' ); //for option-tree about page
- add_filter( 'ot_show_new_layout', '__return_false' ); //for new layout option
- add_filter( 'ot_theme_mode', '__return_true' ); //for option-tree css or style
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement