WP Manifestindependent plugin directory
manifest / developer / cmb2-plus

CMB2 Plus

Common utility classes for the CMB2 plugin on WordPress.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/log-oscon/cmb2-plus/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Common utility classes for the CMB2 plugin on WordPress.

Usage

A dropdown for taxonomy terms which does NOT set the term on the post

$cmb->add_field( array(
    'name'           => 'Featured Category',
    'desc'           => 'Set a featured category for this post.',
    'id'             => '_cmb2_featured_category',
    'type'           => 'select',
    'options_cb'     => 'cmb2_get_term_options',
    'get_terms_args' => array(
        'taxonomy'   => 'category',
        'hide_empty' => false,
    ),
) );

Front Page show_on filter

This shows only if a static page is set and you're editing it.

'show_on' => array( 'key' => 'front-page', 'value' => '' ),

Changelog

1.0.0

  • Initial release.