How to Create an Advanced Theme Options Page in WordPress

Hello WordPress developer, in this tutorial i will discuss about how to create an advanced theme options panel in WordPress. There is WordPress options page generator, but in this tutorial we will create our own WordPress options page.

In this option page in WordPress tutorial we will create custom options panels in WordPress. If we follow options page structure WordPress will automatically handle all of the option creation, update, saving, and redirection for you.

In this WordPress options page tutorial i will create a simple author box. We will create many field's like author name, author bio, author avatar and author Facebook profile link in our custom WordPress options page.

See from the below image which we are going to make in this tutorial. Just you have to follow this code to make it.

Preview : Backend

create-an-advanced-theme-options-panel-in-wordpress

 

Preview : Frontend (Without design)

wordpress-theme-options-page

 

Now start our WordPress theme options page tutorial. In the first step open your theme functions.php file and paste this below code.

functions.php

require get_template_directory() . '/inc/site-options.php';

 

Now create a page in the following derectory and paste this below code.

inc/site-options.php

 

All are set to go. Now just we have to print our backend data to frontend. It is very easy to do. Just see the below code.

 

Check also : How to Pass PHP Data to JavaScript in WordPress

 

Hope it can help you. You can visit to learn more about WordPress options page from this link.