mustardBees / cmb-field-select2

Select2 field type for Custom Metaboxes and Fields for WordPress
93 stars 46 forks source link

Installation Guide #1

Closed asifsaho closed 10 years ago

asifsaho commented 10 years ago

Can you provide 2 lines installation guide for this plugin?

jajouka79 commented 10 years ago

function wpb_initialize_cmb_meta_boxes() { if ( ! class_exists( 'cmb_Meta_Box' ) ) require_once(plugin_dir_path( FILE ) . 'init.php'); require_once(plugin_dir_path( FILE ) . 'cmb-field-select2-master/cmb-field-select2.php'); }

add_action( 'init', 'wpb_initialize_cmb_meta_boxes', 9999 );

basically load the select2 file after you load the cmb init file

mustardBees commented 10 years ago

Cheers @jajouka79. The alternative is to place cmb-field-select2-master into your wp-content/plugins directory and activate as if it were a standard WordPress plugin.

I'll add installation instructions to the readme in a future update.

asifsaho commented 10 years ago

Thanks a lot guys :)