You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
DomagojGojak edited this page Dec 5, 2014
·
6 revisions
Creating custom post types with OmniBuilder is easy. All you need to do in order to create one is to use and create a instance of OmniBuilder\Custom_Post_Type class which is provided by the OmniBuilder.
use OmniBuilder\Custom_Post_Type;
$project = new Custom_Post_Type( 'project' );
You can also pass additional argumets supported by the WordPress API as a third parameter (second parameter is reserved for custom meta box(es) implementation).
use OmniBuilder\Custom_Post_Type;
$project = new Custom_Post_Type( 'project', array(), array(
'supports' => array( 'title', thumbnail' )
) );
You can create as many custom post types as you wish.
use OmniBuilder\Custom_Post_Type;
$project = new Custom_Post_Type( 'project' );
$location = new Custom_Post_Type( 'location' );