Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
I've just tested your code and it works correctly. Did you set the correct post ID (for the attachment) when getting the value?
July 16, 2018 at 4:28 PM in reply to: Unable to exclude metabox field with MB Include Exclude #10587Anh Tran
KeymasterHi Orice,
I've just updated both MB Include Exclude and MB Frontend Submission. Now they work well together and you can set rules to show/hide meta boxes in the frontend.
Anh Tran
KeymasterYes, of course. The fields are in your code and you can reorder them the way you want.
July 16, 2018 at 2:47 PM in reply to: oEmbed Field Connection prints message on front end when empty #10583July 15, 2018 at 6:45 AM in reply to: oEmbed Field Connection prints message on front end when empty #10576Anh Tran
KeymasterHi Guy,
Thanks for your suggestion. Yes, it was hardcoded in the plugin. I'll add an option & filter for the message and wrap it in a CSS class. That's a good idea.
July 15, 2018 at 6:33 AM in reply to: Unable to exclude metabox field with MB Include Exclude #10574Anh Tran
KeymasterHi Orice,
The MB Include Exclude was created before the MB Frontend Submission quite a long time. So, it checks well in the backend only. I'll make an update to support frontend soon next week.
Anh Tran
KeymasterHi Michele,
I've merged the branch into the
masterbranch, so it's available at https://github.com/wpmetabox/meta-box/. At the moment, I only finished theosmfield, which is an alternative formapfield. If everything goes right, Geolocation will be the next step.And yes, I use Nominatim for the geocoding :). I found the wiki, but didn't look at that carefully until I read code of other libraries. It's great and not hard to implement.
Anh Tran
KeymasterHi Bernhard,
Do you mean there are 2 auto-populated address fields, and when users enter 2 different addresses, they will autofill 2 other fields with lat and lng? If so, it's not possible at the moment. The plugin just use only one (or many) auto-populated address fields, but they affect all the autofill fields. I'll try to improve it to make it possible.
Anh Tran
KeymasterI got it. Please use the
date_i18nfunction as follows:$date = get_post_meta( get_the_ID(), 'field_id', true ); echo date_i18n( 'F j, Y', $date );For more info, please check this docs.
Anh Tran
KeymasterHi Dan,
The issue with version 1.5.9 was fixed. Please just update it again.
Regarding the issue with the dismiss notice, please send me via contact form. I'll check it.
And what do you mean about UABB Info Box module & Meta Box?
Anh Tran
KeymasterHi,
By default, the plugin shortcode only has 3 fields: user email, password and password confirmation. To add fields to the registration form (including standard fields), please create a meta box for user profile, like this:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $meta_boxes[] = [ 'title' => 'Registration', 'id' => 'your-registration', 'type' => 'user', 'fields' => [ [ 'type' => 'text', 'id' => 'first_name', 'name' => 'First Name', ], [ 'type' => 'text', 'id' => 'last_name', 'name' => 'Last Name', ], // More fields here ] ]; return $meta_boxes; } );Then include this form in the registration shortcode provided by the plugin:
[mb_user_profile_register id="your-registration"]Anh Tran
KeymasterYes, that's possible. To output the date in a different format, please use this code:
rwmb_the_value( $field_id, array( 'format' => 'F j, Y' ) );Anh Tran
KeymasterHi, to register a meta box for a custom post type, please:
- Go to Meta Box > Custom Fields, click Add New to add a new field group.
- Then add fields you want from the left panel.
- Click the tab Settings and select "Posts" in "Show for", and then select your post type below.
- Click Save Changes button
Now go back to your custom post type edit screen and you'll see the meta box appear. Enter some info and update the post.
To show the custom fields's values in the sidebar, there are 2 ways:
Anh Tran
KeymasterHi,
Can you post your full code so I can check it out?
Anh Tran
KeymasterHi Austin,
If you just enable
show_in_restparam for a CPT, it will use the default WordPress namespace, which iswp/v2. In order to use a custom namespace, you have to write a custom REST Controller (which is out of the scope of the extension). Please see here for more details.Update: In case you write a custom REST Controller, you might disable the rest support in the MB Custom Post Type extension, and add a custom code like this.
-
AuthorPosts