Forum Replies Created
-
AuthorPosts
-
October 29, 2019 at 8:48 AM in reply to: Show Custom Post Type Data in place of ID in WP REST API #16734
Anh Tran
KeymasterAs this is a custom code to fetch post data, there won't be a field
meta_boxin the post details. You can add a specific meta value if you want, like this:$arr = []; $ids = get_post_meta($post_id, 'prefix-destination-story-field', false); foreach ($ids as $id){ $value = get_post($id, ARRAY_A); // THIS $value['field_id1'] = rwmb_meta( 'field_id1', '', $id ); $value['field_id2'] = rwmb_meta( 'field_id2', '', $id ); array_push($arr, $value); }Anh Tran
KeymasterThanks for your feedback. Somehow readonly is ignored by jQueryUI datepicker. I fixed it here.
Anh Tran
KeymasterHi Neil,
I think it's possible:
- You have a CPT - training
- Each post with the "training" has a video, which is a Meta Box's field.
- It also has a quiz attached to it. Quiz can be created in GF or any plugin. Then attach to the CPT with Meta Box's select field (or any field that allows you to choose a quiz). The options of the select field might need custom code to fetch all available quiz to select from.
On the front end, you can simply display the video and the button to start the quiz. When the quiz is done, see if there's any hook to allow you to update the post (training). If yes, then simply add the tracking data you want. If you want to track the video ID, then you can add the video (attachment) ID.
October 28, 2019 at 8:36 AM in reply to: Show Custom Post Type Data in place of ID in WP REST API #16718Anh Tran
KeymasterHey Sharath,
Please don't just copy and paste my code. I put a comment "Modify your value here", which means you should get the post details from the post ID (
$value) there. Something like this:add_filter( 'rwmb_get_value', function( $value, $field, $args, $post_id ) { // Change value only for REST API. if ( ! defined( 'REST_REQUEST' ) ) { return $value; } if ( 'p' !== $field['id'] ) { return $value; } $value = get_post( $post_id, ARRAY_A ); return $value; }, 10, 4 );Anh Tran
KeymasterYes, you can. If you have your front end form created with MB Frontend Submission, then you can use MB Geolocation for the fields.
If you're looking for a way to support other forms, then it won't work. The extension works only for Meta Box fields.
Anh Tran
KeymasterHi,
Thanks for your feedback. I've been thinking about this, too. Probably I'll replace the value with *** when the license is valid.
October 25, 2019 at 5:16 PM in reply to: ✅How to provide key to users so they can update extensions #16701Anh Tran
KeymasterYou can ignore some updates if not necessary. We constantly add more features to the plugins, and have to update them. If those are not the features you use, then you might not need to update them immediately.
October 25, 2019 at 5:14 PM in reply to: Show Custom Post Type Data in place of ID in WP REST API #16700Anh Tran
KeymasterHi Sharath,
The values are returned via function rwmb_get_value and it has a filter with the same name rwmb_get_value for you to modify the values.
So, I think you can do something like:
add_filter( 'rwmb_get_value', function( $value, $field, $args, $post_id ) { // Change value only for REST API. if ( ! defined( 'REST_REQUEST' ) ) { return $value; } if ( 'your_field_id' !== $field['id'] ) { return $value; } // Modify your value here. return $value; }, 10, 4 );October 25, 2019 at 5:06 PM in reply to: ✅How to provide key to users so they can update extensions #16696Anh Tran
KeymasterUnfortunately, it's not permitted to give the license to your users. To avoid updates, you can bundle the extensions inside your theme directly. See this guide for details.
Anh Tran
KeymasterCredit link is required. You can see example here:
https://themeforest.net/item/constructent-responsive-construction-wordpress-theme/12910459
Anh Tran
KeymasterHi Joanne,
For example, if you created a field like this in Pods:
https://imgur.elightup.com/tLzdLc6.png
Then all you need to do is convert it to a Meta Box field with something like this:
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { $meta_boxes[] = [ 'title' => 'A Custom Meta Box', 'fields' => [ [ 'id' => 'a_custom_text', // THIS: matches field's Name in Pods 'name' => 'A Custom Text', 'type' => 'text', ], ], ]; } );Anh Tran
KeymasterHi Akram,
You can use the extensions in unlimited sellable items. The only restriction is you can't use it in free items. And keep in mind to put a link credit to the metabox.io website.
So if you're developing themes on ThemeForest, you can use the extension in all of your themes. It's not like the license for Revolution Slider, WPBackery Page Builder where you have to buy a license for each theme.
Anh Tran
KeymasterHi, I’ve just issued the refund for you. Would you mind giving some feedback? What features did you look for? It will help us improve the products. Thanks!
Anh Tran
KeymasterHi Bernhard,
The table
wp_term_relationshipsand the columnterm_taxonomy_idare default in WP. See this page for details. Please check your DB via a tool like phpMyAdmin to see if your database is broken.If it's not, please post the code you use to query the posts here. Maybe the code from that query.
-
AuthorPosts