devinsays/options-framework-plugin

How to incorporate Options Framework directly into the theme?

aonzzung opened this issue · 2 comments

I'm used to successfully incorporate the older version of Options Framework directly into the theme like this path.

MyThemeFolder/OptionsFramework

But after I upgrade to the latest version I cannot make it work again.
I'm also taking a look at this tutorial. Unfortunately, it doesn't work with this latest version also.
(http://www.opencodez.com/web-development/how-to-add-options-framework-to-wordpress-theme.htm)

I've also see that it initialises the files with plugin path.

// Loads the required Options Framework classes.
require plugin_dir_path( FILE ) . 'includes/class-options-framework.php';
require plugin_dir_path( FILE ) . 'includes/class-options-framework-admin.php';
require plugin_dir_path( FILE ) . 'includes/class-options-interface.php';
require plugin_dir_path( FILE ) . 'includes/class-options-media-uploader.php';
require plugin_dir_path( FILE ) . 'includes/class-options-sanitization.php';

Is this make it totally impossible to incorporate Options Framework into the theme?

Do you have a guide for me to do this instead of installing it as an external plugin?

Thanks,

Hi @aonzzung. Have you looked at this project? https://github.com/devinsays/options-framework-theme

There's also a video showing how to do the integration:
http://wptheming.com/options-framework-theme/

Thanks devinsays,

I've checked it and found that if I used the code under "inc" folder of https://github.com/devinsays/options-framework-theme, it works correctly.

However, if I use the code of https://github.com/devinsays/options-framework-plugin, it doesn't work (css and js files are incorrectly loaded).

The version of options-framework.php files are also different, 1.7.2 for the theme version and 1.8 for the plugin version.

I'm just curious that the two are different?

P.S. Anyways, as mentioned, it works now with the code from https://github.com/devinsays/options-framework-theme

Thanks again,