Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
Yes, that's possible. Please add a new parameter
'add_new' => trueto thetaxonomyortaxonomy_advancedfield and then users will have an extra input box to enter a new term.June 22, 2019 at 11:53 AM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15050Anh Tran
KeymasterYour code has some specific PHP functions, especially for the group title which relates to the bug. Can you flatten out it to simple PHP string / array to see if the bug still occur?
By the way, version 1.3.0 of the MB Group extension adds some flexibility for the group title, please see here for details.
Anh Tran
KeymasterAfter checking the code, I found that the fix actually works. Can you please try again?
June 21, 2019 at 3:42 PM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15038Anh Tran
KeymasterCan you send me the code of the meta box?
Anh Tran
KeymasterGlad that it works now. Let me know if you find anything!
Anh Tran
KeymasterHi,
I've just tried it with MB User Meta and it works fine. However, I think the fix above doesn't work well for updating users. I'll probably need to find a better fix.
June 20, 2019 at 3:35 PM in reply to: ✅Set post title automatic by value of dropdown list of selections of posts #15017Anh Tran
KeymasterI'm afraid the value stored for the
postfield is always post ID. I suppose you're trying to set title with a custom code. I'd suggest you add a little code to retrieve the post title from the post ID and then use that title later in your code.June 20, 2019 at 3:28 PM in reply to: ✅Cloning a Metabox Group item results in 'property content is undefined' #15016Anh Tran
KeymasterHi, I'm guessing you're using an old version of MB Group. Please update it first.
Anh Tran
KeymasterHi SWS, modifying the plugin directly won't help.
Please try these steps:
- Download the latest version on Github. Here is the link to the
.zipfile: https://github.com/wpmetabox/meta-box/archive/master.zip - Unzip it and copy all files to your host, overwriting old files of the plugins
And then modify the code for the
taxonomyortaxonomy_advancedfield and add another attribute to the field settings:'remove_default' => trueSo the code of the field will be similar to this:
array( 'id' => 'my_field', 'name' => 'My Taxonomy', 'type' => 'taxonomy_advanced', 'taxonomy' => 'category', 'remove_default' => true, )Anh Tran
KeymasterHi raphael,
The
update_post_metais the low level API for adding post meta, while the revision stays in higher level of the WordPress app. So, if you useupdate_post_meta, that's the expected behavior.I think trigger the creation of a revision can be done with
wp_insert_post. Here is the docs for it: https://wordpress.org/support/article/revisions/#revision-storage-method. Strangely, I couldn't find a programmatic way to create a revision. Probably WordPress doesn't support it yet.Anh Tran
KeymasterHi Dave,
I'm not very experienced with how GF searches for custom fields. Maybe you need to find a hook to filter the list of custom fields (to add your own fields from custom table) or ask GF for help.
Anh Tran
KeymasterHi Pascal,
I've just tested with your code and don't see the problem. Do you see any error in the dev console?
- Download the latest version on Github. Here is the link to the
-
AuthorPosts