-
Notifications
You must be signed in to change notification settings - Fork 7
Getting Started
This section explains how to implement OmniBuilder into your WordPress theme or plugin.
OmniBuilder is still in development stage and is not availabe in stable version yet. Keep in mind that the OmniBuilder could change over time until it reaches first stable version.
OmniBuilder requires:
- PHP 5.3 or higher
- WordPress 3.9 or higher
First you should choose where do you want to keep the OmniBuilder library. Once you do so will need to clone Slicejack/OmniBuilder repository into the desired directory.
$ git clone git@github.com:Slicejack/OmniBuilder.git my-theme/inc/builder
Next you will need to create a PHP file which you will use to include the builder into your theme or plugin. Also, you will need to define 'OMNI_BUILDER_URI' which will represent a URI to the freshly cloned builder/ folder. Don't forget to include the builder.php file into your theme/plugin.
<?php
// my-theme/inc/builder.php
define('OMNI_BUILDER_URI', get_template_directory_uri() . '/inc/builder');
require 'inc/builder/Builder.php';
Great. Now we need a place in which we will create custom post types and custom meta boxes. For that purpose you will create post-types.php file which you will need to include in the builder.php file.
require 'builder.php';
Now you are all set up and ready for custom post type creation.