Forum Replies Created
-
AuthorPosts
-
thelemonlab
ParticipantAs soon as I save the page the 1st one returns to the same value as the 2nd one.
thelemonlab
ParticipantHi,
just tried that, still doesn't work.
1.
array(
'name' => 'Event Type',
'id' => $prefix . 'event_type_option',
'type' => 'taxonomy',
'taxonomy' => 'event-type',
'field_type' => 'select_advanced',
'columns' => 6,
),2.
array(
'name' => 'Second Event Type',
'id' => $prefix . 'event_type_option_2',
'type' => 'taxonomy',
'taxonomy' => 'event-type',
'field_type' => 'select_advanced',
'columns' => 6,
),let me know any help, please.
thelemonlab
Participantadd_filter( 'rwmb_meta_boxes', 'page_events_meta_boxes' ); function page_events_meta_boxes( $meta_boxes ) { $prefix = 'thspe_'; // page event meta box $meta_boxes[] = array( 'id' => 'page_events', 'title' => 'Page Events Custom Fields', 'post_types' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array( // Event Type Section array( 'type' => 'heading', 'name' => __( 'Event Type Section', 'your-prefix' ), 'id' => 'fake_id', // Not used but needed for plugin 'columns' => 12, ), array( 'name' => 'Event Module Headline', 'id' => $prefix . 'events_module_title', 'type' => 'text', 'columns' => 12, ), array( 'name' => 'Event Type', 'id' => $prefix . 'event_type_option', 'type' => 'taxonomy', 'taxonomy' => 'event-type', 'field_type' => 'select_advanced', 'columns' => 6, ), array( 'name' => 'Information Sessions Listing Points', 'id' => $prefix . 'info_session_listing', 'type' => 'text', 'clone' => true, 'sort_clone' => true, 'columns' => 6, ), ), ); return $meta_boxes; }thelemonlab
ParticipantCode below:
add_filter( 'rwmb_meta_boxes', 'page_events_meta_two_boxes' ); function page_events_meta_two_boxes( $meta_boxes ) { $prefix = 'thspep_two_'; // page event meta box $meta_boxes[] = array( 'id' => 'page_events_two', 'title' => 'Sencond Page Events Custom Fields', 'post_types' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'type' => 'heading', 'name' => __( 'Second Event Type Section', 'your-prefix' ), 'id' => 'fake_id', // Not used but needed for plugin 'columns' => 12, ), array( 'name' => 'Second Event Type', 'id' => $prefix . 'event_type_option', 'type' => 'taxonomy', 'taxonomy' => 'event-type', 'field_type' => 'select_advanced', 'columns' => 6, ), array( 'name' => 'Second Feature Points', 'id' => $prefix . 'feature_points', 'type' => 'text', 'clone' => true, 'sort_clone' => true, 'columns' => 6, ), ), ); return $meta_boxes; }thelemonlab
ParticipantThanks for the reply Anh.
here its the version:
/** * Plugin Name: MB Term Meta * Plugin URI: https://metabox.io/plugins/mb-term-meta/ * Description: Add custom fields (meta data) for terms. * Version: 1.0.5 * Author: Rilwis * Author URI: http://www.deluxeblogtips.com * License: GPL2+ * Text Domain: mb-term-meta * Domain Path: /lang/ */and here its my code to require the plugin.
// Define required variables require_once(__DIR__."/meta-box/meta-box.php"); require_once(__DIR__."/meta-box-columns/meta-box-columns.php"); require_once(__DIR__."/meta-box-include-exclude/meta-box-include-exclude.php"); require_once(__DIR__."/meta-box-tabs/meta-box-tabs.php"); require_once(__DIR__."/meta-box-group/meta-box-group.php"); require_once(__DIR__."/meta-box-term-meta/meta-box-term-meta.php"); require_once(__DIR__."/meta-box-conditional-logic/meta-box-conditional-logic.php");thanks again!
thelemonlab
ParticipantHmmm..
Still not working for me...Getting now.
Fatal error: Uncaught Error: Call to undefined method RWMB_Field::call() in /Users/tien-weilin/Documents/Projects/Carlos/the-hotel-school/wp-content/themes/ths/lib/meta-box-term-meta/inc/field.php:38I am using the 1.0.5 version.
Thanks.
thelemonlab
ParticipantHi Anh,
Have you tried in a Custom Post Type? I can see the one you send its working on the regular posts.
Let me know.
Thanks.
Carlos -
AuthorPosts