This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); | |
function your_prefix_register_meta_boxes( $meta_boxes ) { | |
$meta_boxes[] = array ( | |
'title' => 'Car Rental', | |
'id' => 'car-rental', | |
'post_types' => array( | |
0 => 'car-rental', | |
), | |
'context' => 'normal', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); | |
function your_prefix_register_meta_boxes( $meta_boxes ) { | |
$meta_boxes[] = array ( | |
'title' => 'Flexible Field Example', | |
'post_types' => 'page', | |
'fields' => array( | |
array ( | |
'id' => 'sections', | |
'type' => 'group', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_dequeue_style( 'font-awesome' ); | |
wp_dequeue_script( 'jquery-magnificpopup' ); | |
wp_dequeue_style( 'jquery-magnificpopup' ); | |
wp_dequeue_script( 'jquery-waypoints' ); | |
wp_dequeue_script( 'imagesloaded' ); | |
wp_dequeue_script( 'jquery-throttle' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { | |
$meta_boxes[] = array( | |
'title' => 'Section Hero', | |
'post_types' => 'page', | |
'fields' => array( | |
array( | |
'id' => 'hero_title', | |
'name' => 'Title', | |
'type' => 'text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_boxes[] = array( | |
'title' => __( 'Content blocks' ), | |
'post_types' => 'page', | |
'fields' => array( | |
array( | |
'id' => 'content-block', | |
'type' => 'group', | |
'clone' => true, | |
'sort_clone' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { | |
$meta_boxes[] = array( | |
'title' => 'Test', | |
'fields' => array( | |
array( | |
'type' => 'select_tree', // or checkbox_list | |
'id' => 'cb', | |
'name' => 'Hierarchical checkboxes', | |
'options' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This demo shows you how to save WYSIWYG field content created by Meta Box plugin as post content. | |
* | |
* @link https://metabox.io/docs/how-to-save-wysiwyg-content-as-post-content | |
*/ | |
add_action( 'init', function () { | |
// Remove the editor for the post type. | |
remove_post_type_support( 'post', 'editor' ); // Change 'post' to your custom post type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { | |
$meta_boxes[] = [ | |
'title' => 'Group', | |
'fields' => [ | |
[ | |
'type' => 'group', | |
'id' => 'group', | |
'clone' => true, | |
'fields' => [ |