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.
A. SOLUTION 1
– Step 1: Install & Active SmartFramework as other plugins on wordpress.org(View 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
require_once get_template_directory() . '/inc/meta-boxs-config.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.
B. SOLUTION 2
– Step 1: Extract smart-framework.zip to your local computer, look like:
– Step 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:
– Step 3:
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:
require_once get_template_directory() . '/inc/smart-framework/smart-framework.php';