39 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
bootstrapguru says
20 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
WatchMeShine says

I think I figured out how to import everything using a one click import system. This includes widgets, navigation menus, content and theme options the only thing left is setting those settings in Settings->Reading.

For widgets: I discovered a plugin called Widget Settings Importer/Exporter https://wordpress.org/plugins/widget-settings-importexport/

This plugin exports the widgets as a json file. And as you may know json is awesome.

For menus I use a function like this. It runs after the content has finished importing.
function set_demo_menus(){

        //Import Menus
        $top_menu = get_term_by('name', 'Top Menu', 'nav_menu');
        $main_menu = get_term_by('name', 'Main Menu', 'nav_menu');
        $footer_menu = get_term_by('name', 'Footer Menu', 'nav_menu');

        set_theme_mod( 'nav_menu_locations' , array('top-menu' => $top_menu->term_id, 'primary' => $main_menu->term_id, 'footer-menu' => $footer_menu->term_id ) );

    }

You can see the full code on github here https://github.com/FrankM1/radium-one-click-demo-install You may need to make modification on how theme options are saved because this is different for each framework.

Feel free to share, fork or whatever.

Yes, thank you soooooooo much! I am going to give it a try today. Thank you!!!!

3 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Egypt
  • Sells items exclusively on Envato Market
awran5 says

I think I figured out how to import everything using a one click import system. This includes widgets, navigation menus, content and theme options the only thing left is setting those settings in Settings->Reading.

For widgets: I discovered a plugin called Widget Settings Importer/Exporter https://wordpress.org/plugins/widget-settings-importexport/

This plugin exports the widgets as a json file. And as you may know json is awesome.

For menus I use a function like this. It runs after the content has finished importing.
function set_demo_menus(){

        //Import Menus
        $top_menu = get_term_by('name', 'Top Menu', 'nav_menu');
        $main_menu = get_term_by('name', 'Main Menu', 'nav_menu');
        $footer_menu = get_term_by('name', 'Footer Menu', 'nav_menu');

        set_theme_mod( 'nav_menu_locations' , array('top-menu' => $top_menu->term_id, 'primary' => $main_menu->term_id, 'footer-menu' => $footer_menu->term_id ) );

    }

You can see the full code on github here https://github.com/FrankM1/radium-one-click-demo-install You may need to make modification on how theme options are saved because this is different for each framework.

Feel free to share, fork or whatever.

Hello FranklinM2, Thanks a ton for this … i followed your steps but i got “Fatal error: Class ‘Radium_Theme_Importer’ not found in C:\xx\xx\xx\init.php”

117 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+2 more
FranklinM2 says

I think I forgot to mention you need to load up some files. Try adding this to the top of the init file.

require_once(  dirname( __FILE__ ) .'/importer/radium-importer.php' ); //load data importer admin 
3 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Egypt
  • Sells items exclusively on Envato Market
awran5 says

I think I forgot to mention you need to load up some files. Try adding this to the top of the init file.
require_once(  dirname( __FILE__ ) .'/importer/radium-importer.php' ); //load data importer admin 

Thank you for the quick replay .. but i got another Fatal error: Call to undefined function radium_framework() in C:\wamp\www\xx\xxt\xx\importer\radium-importer.php on line 70.

Again, Thanks for sharing this.

117 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+2 more
FranklinM2 says

Try out the new version. It is now standalone. You can test with default WordPress theme.

https://github.com/FrankM1/radium-one-click-demo-install
3 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Located in Egypt
  • Sells items exclusively on Envato Market
awran5 says

Try out the new version. It is now standalone. You can test with default WordPress theme. https://github.com/FrankM1/radium-one-click-demo-install

Great! it works! i got successfully import all data, images, etc .. but still menu, widgets doesn’t work. I got some errors too:

“Strict standards: Redefining already defined constructor for class WXR_Parser_Regex in C:\xxxx\parsers.php on line 408”.

“Strict standards: Declaration of WP_Import::bump_request_timeout() should be compatible with WP_Importer::bump_request_timeout($val) in C:\xxxx\wordpress-importer.php on line 38”

“Notice: unserialize(): Error at offset 0 of 30628 bytes in C:\xxx\radium-importer.php on line 25”

I’ve tested it with 2 themes, overall it works just fine .. Maybe as “Smartik” mentioned before, it’s kinda hard to get a global tool that will work with any theme but yet it’s not impossible.

Again .. Thank you very much for sharing this!

117 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+2 more
FranklinM2 says

Thanks for giving it a spin. I think this will work with any theme if you set it up properly.

You need to get the widgets data using https://wordpress.org/plugins/widget-importer-exporter/ rename the file to widgets.json instead on widgets.wie

The trick with the menu is knowing which menus have been exported in the content.xml and where they are placed in the theme. Just look for the

register_nav_menu( ); 

functions to see what the menu name and location and add them to the set_demo_menus function.

The first two php errors you are seeing are just that, warnings. I think the WordPress Importer library hasn’t been updated yet.

The third warning might be because you haven’t define the theme options file yet. Not sure.

20 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
WatchMeShine says

Franklin M2, I could kiss you full on the lips.

The simplest most perfect installation and execution. I can’t even recall how many hours I’ve spent trying to do this. And you have delivered it just in time for my new theme. Thank you, love.

Thank you.

I have one super easy question. After the content is installed, although it works perfectly I get this message: “Theme options import data could not be read. Please try a different file.” Odd because it did read the file. I know it’s something I did wrong. Any idea what?

727 posts Theme20.com
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Won a competition
  • Sells items exclusively on Envato Market
+8 more
T20 says

Hi Franklin,

Thanks for this plugin, is there any way to import settings of OptionTree ?!

by
by
by
by
by
by