2

edit: I've re-written this because it is unclear, apologies it was written rushed on a Friday afternoon.

Wordpress has import/export functionality for posts within wordpress, I am a theme developer trying to export demo content with my theme, I would like users to be able to click a button within my plugin and then that will load in all the demo content.

The problem is Wordpress's native functionality only handles posts and media images, it does not handle things like site options (I would like to set the front page post) and widgets + their locations, my question is how can I write something that would import my widget settings and some site options

1
  • It's not clear to me what you're trying to accomplish.
    – mor7ifer
    Commented Jan 30, 2015 at 17:39

1 Answer 1

1

I believe that if you are not going to do a massive sql insert (which I think is likely just as efficient) that you need to go ahead and utilize the plugin api and at the time of the button being pressed, create them. I think it's pretty clear your choice is either to create the widgets on the fly, or to import through an sql insert.

http://codex.wordpress.org/Plugin_API should point you in the right direction if you'd prefer to avoid the SQL insert.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.