Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Gary,
The Conditional Logic extension works only for fields in one page. So if you have a settings page, you can set conditions for the fields inside. But you can't set conditions from another settings page. The purpose of the Conditional Logic extension is make a field visible/hidden in real time, and thus, it has to know the fields in the current page.
As the settings page is created by you, you can control how many fields are there and can avoid a super large array of settings. WordPress supports quite well for the length of option value in the database.
Anh Tran
KeymasterHi Gary,
Thanks for choosing Meta Box!
In Meta Box, code that you're using in your PHP files and the field groups you created in the MB Builder work independently and simultaneously. There's no connection between the code and the fields created in MB Builder.
Unless you export the code from the MB Builder and put it in your theme/plugin. In that case, what loads first will take effect. But you should avoid this as it's confusing. If you want to use code, you should move the field group in MB Builder to Trash (or switch to Draft) to prevent it from loading.
Besides, in MB Builder, the custom attributes feature is powerful enough for you to add custom settings for the meta box or for the fields. Using this feature will help you achieve the same effect as using code. However, if you want to use code, please just use it.
Anh Tran
KeymasterHi Gary,
Thanks for a great question. The settings page doesn't support for saving to a custom table yet. The problem (technically) is the storage set for a setting page is fixed to use only options table.
Besides, the custom table also maps fields with an entry (post, term or user) via its ID. In case of the settings page, there's no such an ID. Thus, breaking the structure of the custom table.
I'm curious why do you want to save settings to custom table? I don't see any benefit using it over standard options table.
Anh Tran
KeymasterHi, Elementor already has the image size option, please use it:
Anh Tran
KeymasterHi Peter,
Glad that you found the problem. That's what I said in the previous comment. However, I've added a simple check for the Meta Box plugin that allows you to have a meta box with no fields. Try it here.
July 10, 2019 at 9:08 AM in reply to: ✅Conflict with Yoast and/or GravityView front end submission #15308Anh Tran
KeymasterOK, let me take a look.
Anh Tran
KeymasterI know this is a stupid question, but have you activated the MB Admin Columns extension? Some users forget to do this.
Anh Tran
KeymasterHi Peter,
These errors happen because some meta box is mis-configured. Please check the code for meta box registration to make sure it follows the docs. These are usual problems:
- Forget to return the
$meta_boxesvariable from the callback for therwmb_meta_boxesfilter. - Forget to add fields to the meta boxes.
Anh Tran
KeymasterHi,
Please use the
'require' => trueparameter for the field. The validation doesn't work in this case.Anh Tran
KeymasterHi Ben,
These are interesting questions!
- CSS: in the MB Frontend Submission extension, the CSS is outputted in the same location as the form. It's not in the header nor footer. The plugin uses
wp_enqueue_styleto output the CSS. Unfortunately, this function doesn't support the location of the CSS (header, footer). I'd suggest optimizing the CSS with a minify plugin like Autoptimize. - jQuery: jQuery is registered by WordPress and you should not remove it. A safe way to use the latest version of jQuery is using the plugin Use Google Libraries or this technique. In either way, please test it first.
Anh Tran
KeymasterHi Ben,
Sorry, the contact form and the forum doesn't accept attachments, just for security reason. You can upload the file to https://send.firefox.com or https://wetransfer.com and send me the link.
Anh Tran
KeymasterHi Adrien,
It's not possible with WordPress. However, you can do this with a help of LH User Taxonomies plugin.
Anh Tran
KeymasterHi,
Passing IDs directly in the
post__inparameter will generate a SQL query like this:SELECT * FROM wp_posts WHERE ID IN (1,2,3)It doesn't generate
ORstatement as you thought.Because the ID is the primary key of the posts table, this query is performant and faster than normal queries.
If you're worry about getting 5000 records from the DB, then imaging this technique as breaking a very slow query (if you do the normal way with WP_Query and JOIN) into 2 fast SQL queries. Although the number of queries increases, the performance is much better.
Anh Tran
KeymasterPlease send me the credentials via the contact form (link above). It's secured.
- Forget to return the
-
AuthorPosts