Skip to content

Commit

Permalink
Add basic installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mustardBees committed Sep 11, 2014
1 parent c13b841 commit 3a0d165
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,35 @@

## Description

[Select2](http://ivaynberg.github.io/select2/) field type for [Custom Metaboxes and Fields for WordPress](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress).
[Select2](http://ivaynberg.github.io/select2/) field type for [CMB2](https://github.com/WebDevStudios/CMB2 "Custom Metaboxes and Fields for WordPress 2").

**Running an older version of CMB? Check the [previous releases](https://github.com/mustardBees/cmb-field-select2/releases).**

This plugin gives you two CMB field types based on the Select2 script:

1. The `pw_select` field acts much like the default `select` field. However, it adds typeahead-style search allowing you to quickly make a selection from a large list
2. The `pw_multiselect` field allows you to select multiple values with typeahead-style search. The values can be dragged and dropped to reorder

## Installation

You can install this field type as you would a WordPress plugin:

1. Download the plugin
2. Place the plugin folder in your `/wp-content/plugins/` directory
3. Activate the plugin in the Plugin dashboard

Alternatively, you can place the plugin folder in with your theme/plugin. After you call CMB:

```php
require_once 'init.php';
```

Add another line to include the `cmb-field-select2.php` file. Something like:

```php
require_once 'cmb-field-select2/cmb-field-select2.php';
```

## Usage

`pw_select` - Select box with with typeahead-style search. Example:
Expand Down

0 comments on commit 3a0d165

Please sign in to comment.