Forum Replies Created
-
AuthorPosts
-
April 17, 2019 at 2:04 PM in reply to: ✅Image field has edit link even when user does not have edit capability #14185April 17, 2019 at 1:43 PM in reply to: ✅How to redirect to the editing mode after adding a post #14183
Anh Tran
KeymasterHi, all you need is just adding
edit=trueto the shortcode. Theeditoption is added in version 1.5.0.April 17, 2019 at 1:40 PM in reply to: ✅How to use metabox to expire post type automatically after 30 days interval #14182Anh Tran
KeymasterCan you please explain the "expiry" of a post type? What does that mean?
April 17, 2019 at 1:40 PM in reply to: ✅how to use custom fields of post type in admin as filter using metabox #14181Anh Tran
KeymasterWhat do you mean "as a filter"?
April 17, 2019 at 1:38 PM in reply to: Delete all media images linked to post type using front end form #14180Anh Tran
KeymasterHi, please follow this solution: https://wordpress.stackexchange.com/q/134894/2051
Anh Tran
KeymasterHi Barikom,
Unfortunately, Meta Box doesn't handle all the WC form. The plugin works only with fields that are created by Meta Box.
Anh Tran
KeymasterHi Vladimir,
Please set the
templateto the path of the template file, without.., e.g.templates/page-product-tech-template.php.Anh Tran
KeymasterI'm not quite clear what do you mean by "Any possibility of this field or the identification code be automatic". I just understand that posts have a custom field
the_user, which stores ID of the user you want to connect with. If you change the field ID fromthe_usertoauthor, then simply change that text in the code. That's all.Anh Tran
KeymasterUnfortunately, it's not possible.
Anh Tran
KeymasterHi,
Now I got it!
Do you have a field for user to select a product that associated with that user? I didn't see you mentioned about it above.
If you already have that, assuming the field ID is
ag_product, then you need to modify the rest response to include product details. Here is a sample code that you can use (put it in your theme'sfunctions.phpfile or your plugin file):add_action( 'rest_api_init', function () { register_rest_field( 'user', 'to_quantity', array( 'get_callback' => function( $user ) { $product = get_user_meta( $user['id'], 'ag_product', true ); return get_post_meta( $product, 'to_quantity', true ); }, ) ); register_rest_field( 'user', 'to_description', array( 'get_callback' => function( $user ) { $product = get_user_meta( $user['id'], 'ag_product', true ); return get_post_meta( $product, 'to_description', true ); }, ) ); register_rest_field( 'user', 'to_advantages', array( 'get_callback' => function( $user ) { $product = get_user_meta( $user['id'], 'ag_product', true ); return get_post_meta( $product, 'to_advantages', true ); }, ) ); } );Anh Tran
KeymasterHi Virgile, thanks a lot for your feedback. I'll check and fix the plugin asap!
To be honest, security is not my strength and I'm still improving it. Thanks for your help!
Anh Tran
KeymasterUnfortunately, not. It should be consistent with other cloenable fields.
Anh Tran
KeymasterHave you tried clearing browser cache? It’s an update of JS and requires to clear cache!
Regarding the removal, when there is one instance, the remove link/button won’t show. It’s for you to enter data.
Anh Tran
KeymasterHi Christopher,
We have that on the plan but it's not a priority at the moment. Sorry, but I don't have ETA for this feature.
Anh Tran
KeymasterHi Ryan, I've just fixed this bug and sent you a copy via email. Please try it and let me know the result.
-
AuthorPosts