In you code you are passsing ‘Page’ as object types.
Please update your code as follows:
$cmb = new_cmb2_box( array(
'id' => $prefix . 'banner_media',
'title' => __( 'Banner media', 'foo' ),
'object_types' => array( 'post' , 'page' ),
'context' => 'advanced',
'priority' => 'default',
) );
When set object types to Post and Page both then it will be available to both post types. you can also include any custom post type as well.
Related Posts:
- Best way to manage a lot of pages in Wp Admin [closed]
- How can I show drafts in wp_dropdown_pages list?
- add_meta_box Callback not being called
- Add menu page issues (permissions & position)
- Price comparison table based on Custom Post Type?
- WordPress Plugin and other pages not opening
- The sidebar in wp-admin dashboard disappears when viewed on mobile screens in WordPress
- Show only those pages that are created by the specific logged in user in WordPress
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- I found this in a plugin. What does it do? is it dangerous?
- Pass PHP variable to javascript
- Disable /wp-admin/plugin-install.php
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How to export comments in WordPress?
- Is there a way (plugin?) to restrict a user to being able to edit just one page?
- How to eliminate weird 404 errors in wp-admin?
- How to stop showing admin notice after close button has been clicked
- Where are plugins located
- Admin menu as submenu from another plugin
- Is There a WordPress Hook to Filter the Edit Posts View?
- Creating a WordPress admin page without a menu for a plugin
- What is the best page ordering plugin that works well with WPML? [closed]
- Why does WordPress require a ftp server to be running on the webserver to transfer plugins?
- Reordering themes in admin panel
- WordPress Admin is displaying Not Available
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- Is there any record of installed plugins in the database?
- How can i force Display names to be the same as Usernames?
- Add content to /wp-admin/plugin-install.php admin screens
- Plugin: How to make links in admin page open up inside of the admin panel
- Custom admin column disappearing when using Quick Edit [duplicate]
- Create page when plugin is activated
- WordPress admin notice in plugin function
- Using tabs for wordpress plugin
- How to remove/hide action links cluttering under specific plugins’ names
- jQuery plugin only in one page/post
- Adding Custom Fields for Img in Posts
- How do I add to the list table a filter?
- Getting Custom Post Type content from main-site of a Multisite
- How can I save repeatable fields with one value inside an array?
- Adding Visibility Options
- Edit Imported advanced Custom Fields from wordpress Dashboard
- Plugin Development: WordPress processes twice on post update. How to skip process on the first?
- Pages with 2 Columns
- How to create a Page alias in WordPress
- Add custom meta box on Post page
- how to not show plugin in admin area
- WP-PageNavi plugin doesn’t work with multiple pages of search results
- How to extract images of post and pages excluding header and logo image in wordpress?
- how to display all posts Custom fields dynamically?
- “Are you sure you want to do this?” when deactivating all plugins in WordPress 4.3.1 [closed]
- How to make a WP admin button/menu similar to Jetpack Notifications?
- How to get custom field image url of specific size
- Getting “Fatal error: Call to undefined function wp_cache_get() in option.php” after updating a cache plugin [closed]
- How to exclude a widget from page 1 of a paginated post
- How Restrict access to admin dashboard by specific static ip?
- Advanced Custom Fields query
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- Custom options page checkbox will not save, despite working with text
- Datepicker not supporting timepicker
- Upload files programmatically to users
- Replace existing pages with new pages, keep menu links
- How to show category images (from plugin) on a regular page (page-example.php)?
- How WordPress autosave can save plugin fields?
- How to create Repeater fields using Advanced Custom Fields?
- [Plugin: Posts 2 Posts] How does it work?
- How can I filter the contents of a metafield before it’s displayed in the admin?
- Questions about brute force attacks on the admin username, coming from amazon IP addresses
- Why would WP-CLI and WP Admin show different list of plugins with updates?
- Creating a menu page in a Object Oriented developed plugin
- Distributing and packaging plugins
- Edits to plugin not taking effect
- Plugin allowing for artists, events and venues
- Custom Text Under Navigation Links
- Set a category for a page
- Automatically adding post and pages to new blog setups
- How could I execute my plugin just in frontend (not in backend)
- Can’t see login page after migration
- Custom height/width for thickbox in WP Backend
- Hide Theme options and Customize Admin menu
- How to remove duplicate Custom Fields?
- Making menu link open in new tab?
- After activating a Plugin, /wp-admin is no longer accessible
- Copyright messages for a particular set of pages
- Weird problems after recovery from security breach
- Plugin not saving values when placed in a folder within /wp-content/plugins
- How can I create a plugin installation link?
- Security checking in meta_box save is reluctant?
- Show a special message for private page?
- How can plugins have their own pages?
- wordpress reusable content blocks
- Cannot access wp-admin after disabling all plugin
- Make the checkbox meta field checked by default
- Add a plugin before main container
- Last modified field for user profile?
- Function to prevent users from trashing comments
- How to Sort the Favorite Plugins Screen Alphabetically?
- Hide extra menus from WordPress Dashboard
- How to provide a plugin which requires CMB2 (plugin dependencies)?
- WordPress CMB2 – Run function on save