Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterSorry, I missed that. I thought the code is the code that you're using.
Yes, there's a bug with the image_select field. It uses radio for inputs, so we can't use
#field_idin our rules. Please change it to[name=rnr_wr_pagetype]and update the plugin.Anh Tran
KeymasterHello,
I've checked your code and it works for me. Here is the video:
Please check the
$prefixagain. Probably you missed it.Anh Tran
KeymasterHello,
The MB Frontend Submission uses WordPress
wp_insert_post()andwp_update_post()to create/update a post. Both functions fire thesave_posthook. So, your code still works in the frontend. Please try and let me know how it goes.Anh Tran
KeymasterI see. The code that I posted above works for whole website, because that's the only PHP hook WordPress provides. And it's site-wide.
If your CPT doesn't have any other upload fields, then you can add some PHP checks to make sure the filter runs only for that CPT only. That might work.
And if you can hook into the ajax process, please share with us. I'm curious how to do that, too.
Anh Tran
KeymasterHi, you can use a hidden field for that purpose. Alternatively you can hide it with CSS. Or more advanced - use MB Conditional Logic to hide it.
Anh Tran
KeymasterHello,
Regarding the code to show a sub-field inside a group, your code is correct and that is a nice approach. I guest that's the best way to do it.
Sorting seems not to be doable for group values, unfortunately. The quick edit is not available at the moment, neither (we haven't done that for normal fields as well).
Regrading your data, I think you can just create a group called
variation(a combination, you can find any better name) and it has 3 sub-fields:- Size: can be a select field if number of sizes are limited
- Batch: a text field or select field (if you have predefined batches)
- Amount of bottles: number field
- Price
Then you can show those info in the admin columns in a similar way that you already did above (with similar code).
Anh Tran
KeymasterHi,
I'm not really clear about the question. Do you mean automatically assigning category for some posts selected in a settings page?
Anh Tran
KeymasterHello, the query to get connected posts seems to be ok. What error did you see? Can you please post the code that you use it and see it failed?
Anh Tran
KeymasterHello,
Yes, we do. Please use MB Group for repeater field. You can define any sub-fields inside, even another groups.
For flexible repeater field, please use MB Group with MB Conditional Logic to load sub-fields based on some condition.
Anh Tran
KeymasterHi Michele and David,
Thanks a lot for your inputs. The inconsistent and unclear of information from Google is a big concern to us.
I'll check the OSM next week and will try to provide a quick workaround.
Anh Tran
KeymasterI got an email from Google 2 days ago regarding the same problem. It says that Google still provide free tier for user. The free usage is equivalent to $200 per month. Adding credit card to your billing info will be able to add a coupon to your account that increases the limit to $500 per month.
I attached the screenshots here so you can see the details:
https://imgur.com/gallery/h200Jhk
One big note in this announcement is that all fields that don’t have API key won’t work any longer.
So, I think in short terms, the Google Maps field still works if you already have a API key. However, in long term, we should figure out a better way. I’ll check Open Street Maps to see if we can integrate it.
Anh Tran
KeymasterSorry, can you try again now?
Anh Tran
KeymasterHi,
Why don't you use the
confirmationattribute of the shortcode? It's much easier and no coding required.Anh Tran
KeymasterHi again,
We've just updated the extension with able to save NULL value to the table. Now if the value is an empty string or empty array, it will be saved as NULL. Please update the extension and let us know how it goes.
Anh Tran
KeymasterHello,
I've tested with
upload_dirfilter and it works for Meta Box. However, it's important to note that the documentation on Codex is not accurate. If you use exactly what in the Codex, e.g.:add_filter( 'upload_dir', function ( $param ) { $mydir = '/awesome'; $param['path'] = $param['path'] . $mydir; $param['url'] = $param['url'] . $mydir; return $param; } );Then it will work.
However, if you want to move to a new directory other than
uploads, you need to change not onlypathandurl, but alsobasedirandbaseurl, like this:add_filter( 'upload_dir', function ( $param ) { $param['basedir'] = wp_normalize_path( ABSPATH . 'custom-uploads' ); $param['baseurl'] = home_url( '/custom-uploads' ); $param['path'] = $param['basedir']; $param['url'] = $param['baseurl']; $param['subdir'] = ''; return $param; } );The code above will upload files to
custom-uploadsfolder in the root directory. As you see,basedirandbaseurl,subdirare used to set the correct URL of the files.Please try that in your case and let me know how it works.
-
AuthorPosts