Easy Create WordPress Theme Options with Framework

Using the options plugin framework allows us to create a theme options. For those developers wordpress templates, this framework helps us to make the initial setting themes without much coding.

how to use options framework plugin

Quoted from the website http://wptheming.com/options-framework-theme/, The Options Framework Theme has all the code included to build a out a full featured options panel. It’s a bundled version of the Options Framework Plugin for those folks who want to build the options directly into the theme (rather than relying on a plugin).

 How to build wordpress theme options for your own theme? 

1. Download options framework from github.

2. Copy that framework folder at your theme directory.

3. Call options-framework.php class from functions.php (your theme functions) like example below

From the example, we must define options framework directory first and call options-framework.php with require_once

4. Create php file as options.php in the root folder of your theme (Your wordpress theme options will be stored here).

5. Write the following syntax in options.php

Explanation :

  • To create options heading write the following syntax.

  • To create options value write the following syntax.

  • From the official website, These are the options currently 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
    I tried to add a password options and not be a problem.

example wordpress theme options

 How to call theme options value that we have built 

Use syntax below to call the wordpress options we have built

In example :

If you have google site verification options, you can put the source code in header.php as below

Okay, easy right. If you have question or want to provide feedback on my articles, please write comment below. In addition to the Easy Create WordPress Theme Options with Framework article, there are a lot of my articles useful for you, please check here

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.