Import/Export Theme Options for WP


#1

Hi all,

do you know any good tutorial on how to implement import/export theme options in WordPress… can you share me a link?

thanks


#2

OptionTree has built in guide as far as I know, when used as plugin.


#3

I know, but I want to create my own :slight_smile:


#4

Hello there

I use option tree and as far as I know it’s method of exporting is to serliaze the options array then do encoding then do the reverse when importing.

If ur options code is built over custom post type u can use the regular import/export


#5

Option Tree uses textarea to import/export options, the same way that SMOF does. There is some usability issues with this, as well as an unorthodox way to use textarea as it’s not traditionally meant for data in general. I’m not saying it’s the wrong way to do it though.

If you don’t care about copy-paste then just export the data into a file with xml/json encoding. It’s much cleaner and presents much less headache in the future. :slight_smile: