Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
At this time the plugin does not support to create the inner block, but we are researching and developing this feature and it will be wrapped in the future update as soon as possible.
You can also follow this guide to create the inner block by coding.
Long Nguyen
ModeratorHi,
The plugin supports to display the SVG icon beside the Dashicons, you can easily download an SVG icon from here then open the file downloaded .svg with the editor and use the SVG code.
I'm also going to open an issue for the developer team to integrate the FA icon to the block icon.
Long Nguyen
ModeratorHi,
I've not heard any issues like this with the site uses the Meta Box plugin. But you can increase the memory limit and execution time value by adding this code to the file
wp-config.phpdefine ('WP_MEMORY_LIMIT', '1500M');
set_time_limit(30000); //below the line define('WP_DEBUG', false);then try to save, access the library to check the problem again.
Let me know how it goes.
Long Nguyen
ModeratorHi,
Thank you for contacting us.
I'm going to check it out and let you know later.
April 11, 2020 at 9:21 AM in reply to: ✅It is possible to save a taxonomy field as a normal field #18979Long Nguyen
ModeratorHi,
If you use the MB Builder, please go to the Settings tab and type the name of the custom table to the box
Save data in a custom table, see my screenshotor add the property
'table' => 'my_custom_table'if you use the code. Remember thefield_idmust be the same with column name.For more information, please follow this documentation
https://docs.metabox.io/extensions/mb-custom-table/#using-custom-tablesLong Nguyen
ModeratorHi,
You can check the post or other screen by using the function
get_current_screen()
https://developer.wordpress.org/reference/functions/get_current_screen/and check it before generating JSON
function post_published_notification( $meta_id, $post_id, $meta_key, $meta_value ) { $screen = get_current_screen(); if( is_admin() && is_object( $screen ) ) { if( $screen->id == 'post' ) { echo "This post has been published"; echo "<br>"; echo rwmb_meta( $field_id ); echo "Generate your JSON here"; } } }Long Nguyen
ModeratorHi Brian,
That means you are creating a new/custom select field and pull the GF forms (name or ID) to save with the field.
You can try to use the sample code to create a custom select field, show the dropdown GF form name and save the ID of the form
add_action( 'init', function() { if ( class_exists( 'RWMB_Field' ) ) { class RWMB_GForm_Select_Field extends RWMB_Field { public static function html( $meta, $field ) { $forms = GFAPI::get_forms(); $html = ''; $html .= '<label for="' . $field['id'] . '">Choose a form:</label> <select id="' . $field['id'] . '" name="' . $field['field_name'] . '">'; foreach ( $forms as $id => $form ) { $html .= '<option value="' . $id . '">' . $form['title'] . '</option>'; } $html .= '</select>'; return $html; } } } } ); add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $prefix = ''; $meta_boxes[] = array ( 'title' => esc_html__( 'Select Form', 'text-domain' ), 'id' => 'select-form', 'post_types' => array( 0 => 'post', ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array ( 'id' => $prefix . 'gform_select', 'type' => 'gform_select', 'name' => esc_html__( 'Select Form', 'text-domain' ), ), ), ); return $meta_boxes; }then you can show the GF form in the post content with the ID saved by getting the field value.
For more information, please follow these documentations
https://docs.gravityforms.com/adding-a-form-to-the-theme-file/
https://docs.metabox.io/custom-field-type/April 10, 2020 at 3:52 PM in reply to: ✅It is possible to save a taxonomy field as a normal field #18960Long Nguyen
ModeratorHi,
The field
Taxonomy Advancedonly saves the value in the post meta (table wp_postmeta).The field
Taxonomydoes not store value in the post meta, it sets posts term like category and tag (table wp_term_relationships). The purpose of this field is to replace the default WordPress meta box for taxonomy and offer more options to control how it displays.For more information, please follow this documentation
https://docs.metabox.io/fields/taxonomy-advanced/
https://docs.metabox.io/fields/taxonomy/April 10, 2020 at 2:13 PM in reply to: ✅MB_Relationships_API::each_connected Returns Empty Array #18959Long Nguyen
ModeratorHi,
We are checking this and will let you know when it has done.
Thank you and have a nice day.
April 10, 2020 at 2:08 PM in reply to: ✅PHP Notice: Trying to get property 'id' of non-object #18958Long Nguyen
ModeratorHi Drake,
Something goes wrong with the function
get_current_screen()and it does not return a screen object which always has the propertyid.Please try to edit the file
/wp-content/plugins/metabox-meta-box-aio/vendor/meta-box/mb-user-meta/src/DuplicatedFields.phpand check the object$screenon line 31, the code should be$screen = get_current_screen(); if( ! is_object( $screen ) ) { return $html; }Then clear the log and edit the block again. Let me know how it goes.
April 10, 2020 at 10:15 AM in reply to: ✅Is it possible to use the custom table to save all general post information? #18955Long Nguyen
ModeratorHi,
It is impossible and easier when you create MB Custom Table and use custom fields as the post type support (post content, excerpt, featured image ...) then save the custom fields to the custom table.
You can use the hook
remove_post_type_supportto remove the post type support and only shows the custom fields.For more information, please follow the documentation https://docs.metabox.io/extensions/mb-custom-table/
Long Nguyen
ModeratorHi,
After a few hours of researching, I've found a hook to fire after the metadata is saved
updated_postmeta, please follow the documentation and the sample codeadd_action( 'updated_postmeta', 'post_published_notification', PHP_INT_MAX, 4 ); function post_published_notification( $meta_id, $post_id, $meta_key, $meta_value ) { echo "This post has been published"; echo "<br>"; echo rwmb_meta( $field_id ); echo "Generate your JSON here"; die(); }Please try again and let me know how it goes.
Long Nguyen
ModeratorHi,
You can follow this documentation to use the action
save_postwhich is fired whenever a post or page is created or updated, include the meta data (field value) saved.Try to run the action with the sample code below
add_action( 'save_post', 'post_published_notification', 999, 3 ); function post_published_notification( $post_id, $post, $update ) { echo "This post has been published"; echo "<br>"; echo rwmb_meta( $field_id ); echo "<br>"; echo "Generate your JSON here"; die(); }Long Nguyen
ModeratorHi,
I've tested the default value with the cloneable items and realize it is a bug. I also open an issue for the developer team to fix this bug in the next update as soon as possible.
Thanks for your patience.
April 9, 2020 at 9:44 AM in reply to: ✅rwmb_meta shortcode to display first image in image_advanced field? #18937Long Nguyen
ModeratorHi,
Because the field
Image Advancedalways returns the array of the image info so we cannot use the shortcode[rwmb_meta]to show the first image. If you want to create your own shortcode, please follow this documentation and follow our guide.Let me know if you have any questions.
-
AuthorPosts