Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi, probably because your theme has some CSS that overwrites the above CSS. Please try to inspect the elements and see if there's any rule. The idea here is just setting the label and input 100% width.
Anh Tran
KeymasterHi Ryan,
The
stdonly works if no data has been saved. You can try it with a new user. For existing users or the users that you have edited once, there's some data saved in the user meta and the plugins avoid to usestdattribute.March 25, 2019 at 10:29 AM in reply to: ✅Don't understand how to proceed after setting up custom table #13907Anh Tran
KeymasterHi Adam,
The MB Custom Table hasn't supported for custom content yet. It has to attach to a custom post type (or term/user) at the moment. In short, it helps you move all custom fields to custom tables. But not post type's fields such as title, content, date, etc. These info needs to be saved in posts table as well.
Anh Tran
KeymasterHi,
It's sad to see Meta Box is not a good choice for you. I'm happy to send you a refund. However, would you mind sharing what you expected from the plugins? Maybe I can help clarifying something.
Anh Tran
KeymasterHi Sergio, it's not supported yet at the moment. We had a request for that, but the demand seems pretty low. So it's not a priority and hasn't been implemented yet.
Anh Tran
KeymasterHi vubai, thanks a lot for your feedback and the fix. I'll add that to the plugin and release a new version.
Update: Version 1.4.1 has been released with the fix!
Anh Tran
KeymasterHi Sean, I've just re-tested and don't see that problem. Is that the same code as above?
Anh Tran
KeymasterAccording to MySQL docs:
The TIMESTAMP syntax produces a DATETIME value in MySQL because DATETIME has a range that more closely corresponds to the standard SQL TIMESTAMP type, which has a year range from 0001 to 9999.
That means
TIMESTAMPhas the exact format asDATETIME, which isY-m-d H:i:s. It's not the same as the Unix timestamp as we use in PHP.And saving date with format
Y-m-dstill makes it sortable. So, it's okay to set the column type toDATETIMEand set thesave_formatasY-m-d.March 22, 2019 at 5:49 PM in reply to: ✅New columns not being added to already existing tables #13868Anh Tran
KeymasterHi, you need to call
MB_Custom_Table_API::createoninithook or some hook. Do not call this only once when activate a plugin or a theme. The plugin auto detects the new table structure and upgrade it.Anh Tran
KeymasterHi,
I think you need to use select2 API. Your code seems to work only for normal select.
Anh Tran
KeymasterHi Sergio,
This is a great question! While saving the date with
varcharis not a problem, I think saving indateformat of MySQL might be a better idea. However, as you see, MySQL forces data saved in the DB in its format, not what you enter. So, I think there are 2 solutions for this:- Just use
varchar, so you save what you enter - Use the
save_formatattribute for the field, set it to the format of MySQL and you're free to go. It tells Meta Box to store value in one format and display in another format.
March 22, 2019 at 3:22 PM in reply to: ✅Fields not showing: Warning: Invalid argument supplied for foreach() #13863Anh Tran
KeymasterYes, of course, I will.
March 22, 2019 at 11:19 AM in reply to: Cannot get custom fields to display on a taxonomy page #13856Anh Tran
KeymasterHi Toomas,
Can you
var_dump( $term_id )to see if that's the correct ID of the current term?Anh Tran
KeymasterI got it. Let me summarize the process flow that you're trying to do:
- Getting settings
- Use the settings to register a CPT
- Register custom fields for the CPT
If you don't do the step 3, then you can do both steps 1+2 at priority 30. The CPT will be registered without any problem.
A better solution is getting the settings with
get_option, like this:$option = get_option( 'multi_tema_privado' ); $mb_activacion_articulo = $option['modulo_articulos_activacion'] ?? ''; if ($mb_activacion_articulo == 1) $show_articulo = true; $mb_slug_articulo = $option['modulo_articulos_slug'] ?? ''; - Just use
-
AuthorPosts