Support Forum
Is there a way to get the functionality of MB Groups without purchasing the plugin? $29 is a little steep especially when the others are $19.
I have added the following code but only this is showing up...
<?php
// Register settings page. In this case, it's a theme options page
add_filter( 'mb_settings_pages', 'prefix_options_page' );
function prefix_options_page( $settings_pages )
{
$settings_pages[] = array(
'id' => 'options',
'option_name' => 'options',
'menu_title' => __( 'Options', 'textdomain' ),
'icon_url' => 'dashicons-edit',
'style' => 'boxes',
'columns' => 1,
'tabs' => array(
'general' => __( 'General Settings', 'textdomain' ),
),
'position' => 2,
);
$settings_pages[] = array(
'id' => 'work',
'option_name' => 'work',
'menu_title' => __( 'Work', 'textdomain' ),
'icon_url' => 'dashicons-admin-customizer',
'style' => 'boxes',
'columns' => 1,
'position' => 2,
);
return $settings_pages;
}
// Register meta boxes and fields for settings page
add_filter( 'rwmb_meta_boxes', 'prefix_options_meta_boxes' );
function prefix_options_meta_boxes( $meta_boxes )
{
$meta_boxes[] = array(
'id' => 'general',
'title' => __( 'General', 'textdomain' ),
'settings_pages' => 'options',
'tab' => 'general',
'fields' => array(
array(
'name' => __( 'Logo Dark', 'textdomain' ),
'id' => 'logo_dark',
'type' => 'file_input',
),
array(
'name' => __( 'Logo Light', 'textdomain' ),
'id' => 'logo_dark',
'type' => 'file_input',
),
array(
'name' => __( 'Hello Bar', 'textdomain' ),
'id' => 'hello_bar',
'type' => 'wysiwyg',
),
),
);
$meta_boxes[] = array(
'id' => 'project',
'title' => __( 'Featured Work' ),
'tab' => 'featured',
'settings_pages' => 'work',
'fields' => array(
array(
'id' => 'work-featured-upload',
// Group field
'type' => 'group',
// Clone whole group?
'clone' => true,
// Drag and drop clones to reorder them?
'sort_clone' => true,
// Sub-fields
'fields' => array(
array(
'id' => 'plupload_image',
'name' => __( 'Plupload Image (Alias of Image Upload)', 'your-prefix' ),
'type' => 'plupload_image',
// Delete image from Media Library when remove it from post meta?
// Note: it might affect other posts if you use same imagefor multiple posts
'force_delete' => false,
// Maximum image uploads
'max_file_uploads' => 2,
),
),
),
),
);
return $meta_boxes;
}
I'm sorry but the price for the Group can't be changed.
Your code doesn't work because you don't have the Group extension. Please consider buying it.
Ok no worries. It's just not justifiable at the cost unfortunately so I will opt for coding the required number of boxes for the job. Thank-you for your help.