Options Framework Plugin

The Options Framework Plugin makes it easy to include a full featured options panel in any WordPress theme.

Although this plugin is still maintained and secure, the recommended way to add theme options for new themes is to use the Customizer.

Instructions

Download the plugin and activate it on your site.

To learn how to set up the options panel in your own themes, download the Options Check theme from GitHub and use its files as a base. It’s a blueprint for how the Options Framework works with a sample option panel with every type of option you are able to use and a demo of how to display each one on the front end.

Available Options

These are the options available:

  • text
  • textarea
  • checkbox
  • select
  • radio
  • upload (an image uploader)
  • images (use images instead of radio buttons)
  • background (a set of options to define a background)
  • multicheck
  • color (a jquery color picker)
  • typography (a set of options to define typography)
  • editor

There’s also “heading” to define the menu tabs, and “info” if you just want to add some additional information to the panel.

Returning Option Settings

If you look in index.php of the Options Check theme, you’ll see how each option is returned. It should look something like this:

of_get_option( $id,$default );

What if the Options Framework Plugin is not installed?

The neat thing about this plugin is that it isn’t required for your theme to work. Each option should have a default which will be used if the plugin isn’t installed. Take a look at Portfolio Press without the plugin activated to see how it works.

There are a couple ways to let the user know that options are available if the plugin is installed: a notice on theme activation, an auto prompt on activation, notes in the documentation, etc. I’ve left this up to the theme authors to decide how to implement.

Download the Plugin

Download from WordPress Repository
Download Development Version

Additional Tutorials

Future Development

This plugin is not actively developed. If there’s compatibility or bug fixes needed, let me know.

Exporting/Importing Options

If you are exporting SQL databases, this thread might be of interest to you. There’s also a fork of the theme version, where someone built this out: https://github.com/vauvarin/options-framework-theme

Credits

The Options Panel was originally based on the excellent work of Woo Themes and still uses some of their code.

A huge thanks to all the people who helped out on GitHub, including @mfields, @helgatheviking, @celtic7, @samargulies, @mattweibe, @Mamaduka and any others.

Also a big thanks to folks who made donations to pay for a third party code review: Jason Schuller, Mint Idea, Luke McDonald .

669 Responses

  1. Towfiq

    Devin Thanks for this excellent Framework.

    I have a question, why is when I click the “Visual” button of the editor I get nothing? The “text” mode is working fine.

    I am using the latest version.

    Thanks.

  2. This may be a ridiculously silly question, but I’m a little confused.

    I understood everything in the video tutorial and in the written instructions. However, I’m wondering how Options Check/Framework knows which elements to change in the css and page template files?

    I understand how to create my own customized options page. I just don’t understand how it relates to the theme I’ve developed. I hope that makes sense!

  3. Jill Hoben

    I received this alert after a scan of my word press site. The only change I noticed was in the file version, from WP3.5 to WP3.6.

    * modified plugin file: wp-content/plugins/options-framework/readme.txt
    Any suggestions?

      1. Jill Hoben

        devin,

        I am running a plugin called Word Fence and it sends alerts – maybe a little too much but I would rather know than not know. Sorry if I caused any problems. Thank you.

        Jill

  4. You say “To learn how to set up the options panel in your own themes, download the Options Check theme from GitHub” i follow that link and can not find a download for that file
    so how do i “1) Copy “options.php” from the Options Check theme into your own theme.” without being able to find that file

  5. Hi! I use an associative array in some options. In one example the keys are default, small and large. But the values are diferent because they appear into the select list: ‘Normal (default)’, ‘Small (no thumbs)’, and ‘Large (with thumbs)’.

    Then, if I use the function get_option(‘id’, ‘default’) it returns me the value, not the key. I like work with the key because the key is not shown into the select list and it has no spaces, so I can use it as code; p.e., Css classes, etc.

    I tried to get the key by using array_keys, but it doesn’t work and I don’t find examples on Internet. What I’m doing wrong? There is another way to do that? Thank you very much in advance :)

  6. Daniel

    Hi Devin, thanks for the tutorial.
    I’d like to be able to validate some options.
    In my case I need to validate a numeric option “Price”, in order to prevent the user entering alphanumeric values.
    Is there a way to add some validation function/code?
    Thanks in advance.

  7. Mike

    I must be missing something here.

    I have everything added just like you did in the video. The Theme Options page shows up just fine, the buttons all work, and everything saves perfectly. Although, when I go to output the content, nothing shows up. Here’s what my code looks like within my header.php file:

    What am I missing?

  8. Jerome

    Hi, is it possible to retain the options from a main site to its multisites in a network? The multisites will use the values of the main site when it is created, and the options on the multisites will be updated when it is updated on the main site. I hid some options on the multisites, to allow changes to be made only on the main site, thus I need this persistence for all network sites – Thanks!

  9. chris conway

    hi devin – well impressed with this framework.. is there any way of installing 2 pages of settings.. ive changed the page names to create two pages along with most names on my second page but when i save it saves to the first pages settings and the second page doesnt load saved settings just the defaults? is there an option name i need to change for its own array / saved setting/?

    all help would be greatly appreciated

    thanks

    chris conway

      1. chris conway

        i sorted it thanks.. hackked away cant wait for the next release. is there anyway to quickly add new field types to the interface switch? if ‘background_1’ with a whole different set of options? i got a few to work but.. well do i need to register them or something?

        thanks

  10. chris conway

    could i ask you to send me a quick text example where its allowed html tags? i can work from that thgen to do the rest it be appriciated thanks in advance

    chris conway

  11. chris conway

    // If the developer hasn’t explicitly set an option id, we’ll use a default..

    how do we set a default? – Thanks

  12. Devin Thanks for this excellent Framework.
    but when i use group with two field one editor and another text filed with repeatable . then editor don’t save the value in group.

  13. Dale Ramirez

    I am planning to include this into my commercial plugin. Am i allowed to put a prefix in every function name or wrap every function with function_exists? So that when a user installed a options framework plugin or include options framework in their theme it will not have a conflict?

  14. George

    How do I set a default value to a textbox?

    I assumed ‘std’ => ‘Default Value’ does the trick but it doesn’t change anything. I want to fetch my blog title into the a textbox. I’ve tryed ‘std’ => get_bloginfo(‘name’) but it’s not working.

  15. Hi Devin –

    Had trouble Activating options framework in my WordPress installation …

    Fatal error: Cannot redeclare optionsframework_rolescheck() (previously declared in /home5/drronine/public_html/shop/wp-content/themes/organic_shop/admin/options-framework.php:31) in /home5/drronine/public_html/shop/wp-content/plugins/options-framework/options-framework.php on line 61

    Any clue?

  16. Kevin

    Hello Deven,

    Great work on your options framework it is a great way to create the options for the themes fast and easy. However i encounter a rather strange problem when using a checkbox to hide a dropdown menu and a text input. The dropdown is not hiding properly (it stays visible, but if i tick the checkbox twice it hides). It might be due to my lack of jQuery knowledge, but this seems to work with all other elements, as long as i tested them so far.

    {code redacted}

      1. linggg

        Hi Devin, this plugin is not compatible with wp3.8, does you have a way to solve it? when will the new plugin version be updated?

  17. First time going to use your option framework on my themes, Right now using my own developed options panel. Hope this will help me to build some sophisticated admin panel for my free wordpress themes. Thanks a lot for this wonderful efforts.

  18. Scott

    Hello, I used this plugin previously and need it again for an Organic Themes theme I’m using. I’m running WordPress 3.7.1 and the Options Framework plugin sates compatibility to 3.6.1. Is there a timeline for a new release? I can’t adjust my theme settings correctly without a valid plugin. Thanks!

      1. Scott

        Great, thanks. I did try it and found it to work. I found a comment you made about compatibility shortly after I posted my first comment and gave it a try.

  19. Having a problem with a recent update of the Options Framework plugin. Ran the update and it seemed to go fine and everything seems to work, but I have this persistent message at the top of every window in the Admin side of things

    “The Options Framework plugin is required for this theme to function properly. Install now.”

    Clicking on “Install now” just takes me to page that gives info on the plugin (here) and that it is already installed, so there is no option to re-install it.

    It is indeed installed and Active. I tried de-activating and re-activating but no change. Any suggestion as to how to get this annoying and apparently incorrect message to go away. Thanks!

  20. I’ve updated the Options Framework to v1.7.1 running on WordPress v3.7.1 but the banner at the top of the dashboard page:
    The Options Framework plugin is required for this theme to function properly. Install now.
    Will not go away. When trying to install, it says that current version is already installed. How can I silence this banner?
    tx

  21. webster

    How can I add options panel for my plugin using “Options framework”?

    What version of framework should I use and what code should I add to my plugin to have options page inside of my plugin?

  22. linggg

    Hello Devin, when will the new plugin coming out to support wp3.8? I am installing genesis framework but I found the current plugin not compatible with wp3.8. Thank you

    Lingg

  23. Marianna

    Hi Devin,

    I hope you are well. I have installed and activated the plugin but for some reason it’s not showing up in appearances. Can you help please?

    Thanks,

  24. pdme

    Hi,

    Thanks a lot for a great plugin.

    Is there a way to add field that allows users to select multiple images from the media library? Surely there must be a way to store multiple image URLs in an array?

    Thanks again!

  25. Monica

    I’ve installed the plugin, but I get the following error when I try to activate it:

    Fatal error: Cannot redeclare optionsframework_init() (previously declared in /home3/northtg5/public_html/wp-content/themes/discover/admin/options-framework.php:73) in /home3/northtg5/public_html/wp-content/plugins/options-framework/options-framework.php on line 54

    Any thoughts/help would be greatly appreciated! I’m stuck at this point. :(

  26. I installed the options framework plugin to the wordpress website theme, but apparently my current theme does not have support for the Options Framework plugin. What do I need to do to activate the Theme Options section?

    Thank you!

  27. Really handy! Thank you very much. However, I’m somehow stuck trying to get a textarea working.

    Where can I find a working example for the textarea? Especially the $wp_customize->add_control() part, which is missing in the /options-check/options.php file.

  28. Paul

    Great plugin Devin!

    I’d like to know if it’s possible to put a custom post type tab from wp dashboard to theme options(options framework). If possible how do I do that? please help :(

  29. Dinith

    Hi, being acquainted with the options frame work recently i would like to confirm if the options frame work will delete a previously uploaded file on changing the uploaded file with another one?

    Many thanks.

  30. Girija Dash

    If I want to wrap some options of a single tab in a fieldset or some thing like this, then how to do it?

  31. Virgo

    Hi Devin,

    I’m using option framework together the wordpress customizer.
    I wish to implement a button inside the wordpress customizer that let a user reset all settings to the defaults.
    I think that to do that I need to store all the default options values in a specific record in the options table, for example a recprd witha name like ‘theme_options_defaults’

    Could you suggest me a way to accomplish this that integrates well with option framework?
    I was thinking about a specific hook that store the default options only when a theme is installed.
    Any suggestions would be very appreciated.

    Thank you very much.

  32. chris

    tried removing all files related to wordpress, and removed all database tables related to wordpress, but can’t seem to delete files related to the options framework plugin. Please help me remove these files. thanks,

      1. chris

        Thanks Devin. The whole thing seemed weird to me too — I just keep getting this ‘you’re not permitted’ error, when trying to delete the plugin files. I’ll keep trying, and maybe the my host can help.
        Thanks,

  33. Hpt

    I recently updated the options framework plugin and now the scrolling, featured posts section on my homepage is off by about a quarter of an inch? And when I you look under Appearance, there’s now two tabs for theme options. Any suggestions?

  34. Pls Helpme No active Plugin..

    Fatal error: Cannot redeclare optionsframework_init() (previously declared in /home/oymcom/public_html/wp-content/themes/wpex-pytheas/admin/options-framework.php:35) in /home/oymcom/public_html/wp-content/plugins/options-framework/options-framework.php on line 57

    Theme used PYTHEAS

  35. RadGH

    Hey Devin, it looks like the video has been removed from this post. Instead I see “Sorry, This video does not exist.” Might want to check that out.

  36. lydia

    Mine issue is quite different. The theme i used, i navigate to the smartpanel section where i uploaded the logo and footer button and i tried saving the settings but it isn’t working and i have the plugin activated. Its only warn that the theme doesn’t support Options Framework plugin. How do i go about it?

Leave a Reply