![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
Tagged: dummy, Enfold 3.0, Hide, import, users
-
AuthorPosts
-
October 2, 2014 at 1:03 pm #328885
Hi Kriesi & Co,
With Enfold 3.0, there’s a new Demo Import button that imports various pre-designed templated.
Personally I think this is awesome, but I also foresee my clients clicking on this button and messing stuff up. Is there anyway to hide this in the backend (E.g. through the functions file? For everyone except super admins?)
October 2, 2014 at 1:19 pm #328898Hi TinyGiantStudios!
Go to line 19 in ~\wp-content\themes\enfold\includes\admin\register-admin-options.php
Replace the following:
if(!current_theme_supports('avia_disable_import_export')){ $avia_pages[] = array( 'slug' => 'demo', 'parent'=>'avia', 'icon'=>"doc_text_image.png", 'title' => __('Demo Import', 'avia_framework')); $avia_pages[] = array( 'slug' => 'upload', 'parent'=>'avia', 'icon'=>"import_export.png", 'title' => __('Import/Export', 'avia_framework')); }
With this:
if ( is_super_admin() ) { if(!current_theme_supports('avia_disable_import_export')){ $avia_pages[] = array( 'slug' => 'demo', 'parent'=>'avia', 'icon'=>"doc_text_image.png", 'title' => __('Demo Import', 'avia_framework')); $avia_pages[] = array( 'slug' => 'upload', 'parent'=>'avia', 'icon'=>"import_export.png", 'title' => __('Import/Export', 'avia_framework')); } }
Cheers!
ArvishOctober 2, 2014 at 2:45 pm #328974Thanks for the quick reply Arvish…
Any ideas on when it’s a standalone WP install?
October 2, 2014 at 3:28 pm #329009Hi!
Try the function here: http://kriesi.at/documentation/enfold/remove-the-import-dummy-data-button/
If you are using a child theme you can keep it in the child theme functions file and remove when needed manually.
Cheers!
DevinApril 27, 2015 at 8:02 pm #435556This reply has been marked as private.April 29, 2015 at 4:46 pm #436823Hey!
It’s working fine on my XAMPP setup. Your sure you added it to the child theme functions.php file? Also make sure your using the latest version of Enfold (3.1.3) and that all plugins are deactivated while testing.
Regards,
Elliott-
This reply was modified 9 years, 4 months ago by
Elliott.
April 29, 2015 at 7:15 pm #436956Hi Elliott,
Both of my sites are using 3.1.3. And I’ve turned off plugins to test. Still, the codeadd_theme_support(‘avia_disable_dummy_import’);
placed within my enfold-child functions.php file isn’t removing the Demo Import button. In fact, I’ve created a clean install on a 3rd site using Enfold, and the above code isn’t changing anything.
April 30, 2015 at 6:15 pm #437633Hey!
Are you expecting it to remove the whole tab inside the Enfold options? It’s not going to do that. It will remove all of the demo import images inside that tab so you cannot click on them but the tab will stay in place.
Cheers!
ElliottMay 1, 2015 at 7:20 pm #438240Awe, yes. Thanks for that clarification. It’s working. Sorry to bug you.
-
This reply was modified 9 years, 4 months ago by
-
AuthorPosts
- The topic ‘Remove Demo Import Button’ is closed to new replies.