Title: Activate theme when importing data
Last modified: June 3, 2017

---

# Activate theme when importing data

 *  Resolved [raimermed](https://wordpress.org/support/users/raimermed/)
 * (@raimermed)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/activate-theme-when-importing-data/)
 * Hello,
 * I have several wordpress themes (wp-admin / themes.php), I want when I import
   the data I can also activate X topic that I indicate.
    That is, when I import
   data like pages, post, widgets, menus, I can also activate a theme. It’s possible?
 * I have another question, can I export and import data from woocommerce?
 * Greetings, I hope you can help me.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * (@capuderg)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/activate-theme-when-importing-data/#post-9194130)
 * Hi,
 * I have never tried it, but I guess you could do that with `switch_theme` function:
   [https://codex.wordpress.org/Function_Reference/switch_theme](https://codex.wordpress.org/Function_Reference/switch_theme)
 * Also WooCommerce data can be imported normally, just like pages and posts…
 * Take care!
 *  Thread Starter [raimermed](https://wordpress.org/support/users/raimermed/)
 * (@raimermed)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/activate-theme-when-importing-data/#post-9196786)
 * Hi. Thanks for your answer.
 * Is it possible for you to tell me (instructions) how to do what I said earlier?
   Or do you charge a price for that?
 * What I said was: that with a single button can import the data and that the theme
   is activated automatically, that is, it would be like a quickinstall.
 * Greetings.
 *  Plugin Author [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * (@capuderg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/activate-theme-when-importing-data/#post-9197990)
 * Hi,
 * I’m sorry, but I don’t offer custom code for this project. You should hire a 
   developer that will solve this for you, but essentially you need to call the `
   switch_theme` in the before content import OCDI plugin action: `pt-ocdi/before_content_import`.
   Again, I have never tested this before, so I can’t guarantee that this will work.
 * Take care!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Activate theme when importing data’ is closed to new replies.

 * ![](https://ps.w.org/one-click-demo-import/assets/icon-256x256.png?rev=2506685)
 * [One Click Demo Import](https://wordpress.org/plugins/one-click-demo-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/one-click-demo-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/one-click-demo-import/)
 * [Active Topics](https://wordpress.org/support/plugin/one-click-demo-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/one-click-demo-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/one-click-demo-import/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/activate-theme-when-importing-data/#post-9197990)
 * Status: resolved