Register Meta Boxes

This content will show you how can register my framework to create Meta Boxs(called Options/Settings) for each Page, Post or any Custom Post Type which already registered on your website.

When you already have zip file plugins on your computer, have 2 solutions to integrate.

– Step 1: Install & Active SmartFramework as other plugins on how to do it here)
– Step 2: Create your MetaBox file config(should download meta-boxs-config.php HERE) then copy it to your theme. Or follow to create manual.
– Step 3: Go to file functions.php file(in your theme), add path point to your file config.
– Step 4: Open/Edit file meta-boxs-config.php, update value post type you want below, can add new/change/remove to array:

Example(i’m using “twentyfifteen” theme for demo):
E1: After install & active smart-framework plugins on your website.
E2: Download file demo meta-boxs-config.php HERE
then extract & copy to “\twentyfifteen\inc\” directory. Look like:
E3: Copy code below to functions.php:

– E4: Change value Post Type to Page(mean: apply for only Page)

E5: After that, click Add New Page here:


then scroll down to bottom, you will see new area Settings display look like:

That is success for integrate Meta Boxs options to Page.

Step 1: Extract to your local computer, look like:
sm-structureStep 2: Copy “smart-framework” directory above to any directory in your theme. In my demo, i used “twentyfifteen” and i copied to “inc” directory, view here:
sm-directoryStep 3:
Open file functions.php in your theme, add line:
require_once get_template_directory() . ‘/YOUR_PATH/smart-framework/smart-framework.php’;

In my demo, i copied to “inc” so i will add:

Step 4: 
Do Example in SOLUTION 1 above and do follow it without E1 step. Now you can use Settings(MetaBox) for your page. Check reference DEFINE FIELDS of SmartFramework.