Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterI've just fixed this bug and tested with your code in version 1.2.1. Please update!
Anh Tran
KeymasterHi Thomas, I've just updated the plugin, adding support for Featured Image. Please see the documentation for usage.
Cheers
Anh Tran
KeymasterThanks a lot for your code. I will look at that and fix as soon as I can.
Anh Tran
KeymasterUnfortunately, it's not possible for now. But that's a good idea when combining meta box ids into 1 parameter. I'll see if I can implement that.
Anh Tran
KeymasterHi,
We've never changed plugin slug. It's always
meta-box-group. I think you or someone made a typo mistake totmeta-box-group. There's no reason for a "t" here.Anh Tran
KeymasterHi Thomas,
Let me see if I can find a workaround for this.
Anh Tran
KeymasterHi Ahmed,
I have fixed the 1st issue with this commit. Can you please try it?
Regarding the 2nd issue with the remove clone button, it's actually a bug in your code. Please just close the
</b>tag properly and the bug will go away.Let me know if you still see any bug.
Anh Tran
KeymasterHi,
Thanks for a great question. There was no such functions. I've just added it on Github and added example in the documentation. Please update the code for Meta Box from Github and follow the documentation. I will release a new version soon.
Anh Tran
KeymasterHi Thomas,
I got it. The easiest way to order those fields is just order the code for them. The code that write first will display first.
Let's say you want to move "Hide Post/Page Theme Header" to the top of the list, then just move this code to the top
if ( isset( $meta_box['id'] ) && 'totalpress-post-page-options' == $meta_box['id'] ) { $meta_boxes[$tp_primo_mb]['fields'][] = array( 'id' => 'tp_primo_page_options_hide_header', 'type' => 'checkbox', 'desc' => esc_html__('Hide Post/Page Theme Header','tp-primo'), 'tab' => 'totalpress_hide_post_page_elements', ); // Code for other checkboxes goes here }January 3, 2018 at 9:12 AM in reply to: Function similar to update_post_meta for MetaBox.io custom table plugin #8106Anh Tran
KeymasterWe don't have such function yet. Please use
$wpdb->insert. It's short and fast.Anh Tran
KeymasterOh I see. Glad that you figured it out 🙂
Anh Tran
KeymasterI can't access the site. Can you send me the username/password via contact form?
Anh Tran
KeymasterAnh Tran
KeymasterHmm, that's strange. Can you post your code to create meta boxes here?
Anh Tran
KeymasterHi Thomas,
Thanks for a nice question. Yes, it's doable. In the code from the tutorial, notice this part:
add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes', 20 );The last number is the priority of the code to add fields to a meta box. The plugin which has lower number will run first. So, if you have 6 plugins, just set different numbers for them in a order you want, like this:
add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes_1', 20 ); add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes_2', 30 ); add_filter( 'rwmb_meta_boxes', 'prefix_edit_meta_boxes_3', 40 ); -
AuthorPosts