Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Installation

Praneeth Polu edited this page Jan 17, 2020 · 1 revision

Table of Contents generated with DocToc

If installing the plugin from wordpress.org:

  1. Upload the entire /cmb2-extension directory to the /wp-content/plugins/ directory.
  2. Activate CMB2 Extension through the 'Plugins' menu in WordPress.
  3. Copy (and rename if desired) example-functions.php into to your theme or plugin's directory and require_once from your theme or plugin's main file.
  4. Edit to only include the fields you need and rename the functions.
  5. Profit.

If including the library in your plugin or theme:

  1. Place the CMB2 Extension directory inside of your theme or plugin.
  2. Copy (and rename if desired) example-functions.php into a folder above the CMB2 Extension directory OR copy the entirety of its contents to your theme's functions.php file.
  3. Edit to only include the fields you need and rename the functions (CMB2 Extension directory should be left unedited in order to easily update the library).
  4. Profit.

Please note, when bundling CMB2 Extension with your theme or plugin, you will want to use the release package. You can download the zip file from the WordPress plugin repo, or using the download link on Github. It is recommended that you not clone CMB2 Extension into your project.

This will ensure your bundled version does not contain the development-only files/folders.