Webcreations907 / WBC-Importer-extension

One click demo content importer extension for Reduxframework
GNU General Public License v2.0
66 stars 39 forks source link

Can't set homepage & menu using example functions #79

Open tishasub opened 7 years ago

tishasub commented 7 years ago

Hi there, I'm using wbc importer to import the data which is really cool. But I can't set the homepage & navigation using the example functions that you've provided. I've used the following code in my redux config file and also after it didn't work I moved the code to functions.php of theme file. In anyway the menu & fontpage is not setting. Would like to know how I can set them & where to put the below code. Please help me in this. I don't know what I'm doing wrong but simple help would be appreciated.

https://gist.github.com/tishasub/0fe1dd18b70899432450a01e6691e11d

Have a look at the gist I've created so that you can understand what I'm trying to do.

ashawkat commented 7 years ago

@Webcreations907 I'm also having such issues. But no one here is to help. Can you help out how this can be done. The example functions are not working or I'm doing something wrong? My thing is exactly like this issue

MrShabir commented 7 years ago

Hello Place this function in Loader.php. Then come to init-installer.php file. File Path : wbc_importer\inc\init-installer.php Line Number : 128 Comment this code line. //do_action( 'wbc_importer_before_widget_import', $this->active_import, $this->demo_files_path ); Now Setup Menu.

             $primary = get_term_by('name', 'Main Menu', 'nav_menu');
    $footer = get_term_by('name', 'Footer Menu', 'nav_menu');
        set_theme_mod( 'nav_menu_locations', array(
                'primary' => $primary->term_id,
                'mobile' => $primary->term_id,
                'footer' => $footer->term_id,
            )
        );`

For me Its Working fine. Maybe some other user post better solution.