Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Vadym,
Thanks a lot for your links. I've tested again and experienced the same problem. This issue is something related to the way Gutenberg saves data from TinyMCE editors. It's a bug in the Gutenberg and was reported here. The developer team seems not to have a final solution at the moment. The only workaround is running
window.tinyMCE.triggerSave()before saving posts.Anh Tran
KeymasterHello,
text_listsave data in multiple rows in the database. So, usingupdate_post_metamight removes all existing values.I'd suggest using
add_post_metainstead:add_post_meta($applicantID, $prefix . "address", 'one', false); add_post_meta($applicantID, $prefix . "address", 'two', false);Notice the last parameter, it must be set to
false. For more info, please see the Codex.October 25, 2018 at 2:59 PM in reply to: ✅OpenStreetMap is not working properly with Tabs Extension #11747Anh Tran
KeymasterHi Saqib,
Can you post your code? I checked again and it seems to be working to me. Here is my video: http://recordit.co/L6VvwBMlme
October 25, 2018 at 2:47 PM in reply to: ✅pre_get_posts to get all posts connected to single object #11746Anh Tran
KeymasterHi Juanita,
Sorry to get back late. I tried your code and created a video on that: http://recordit.co/BlAq5rhUVr. The query seems fine to me. Please take a look.
Anh Tran
KeymasterI've checked the code again and it works for me. Please see the video here: http://recordit.co/fnO1hhDR0z
I'm not doing anything special, only copy the code. Can you please check that again? If you see anything difficult, please send me an email with temporary admin account, I'll take a look at that for you.
Anh Tran
KeymasterWe have found the bug. There are meta boxes sharing the same ID, which makes them overwritten when getting values. In case anyone see the same bug, please change meta box IDs, making sure they're unique.
Anh Tran
KeymasterHi,
Can you please post your code here?
Anh Tran
KeymasterHi James,
Currently, the only way to do that is via JavaScript, e.g. using JS to add HTML to the page title.
Anh Tran
KeymasterHi,
If GD uses the same data structure as MB Custom Table, then it's possible. MB Custom Table's data structure is very simple:
- Column
ID: store the object ID (post ID or term ID). - Other columns: store the custom field values.
It's fine if some columns are different, but the ID column must be used for object ID. In that case, you can use MB Custom Table to handle the job for you.
Anh Tran
KeymasterYou're right about the order for bi-directional relationships. I'll add a task on that.
Thanks!
October 22, 2018 at 4:56 PM in reply to: ✅pre_get_posts to get all posts connected to single object #11702Anh Tran
KeymasterHi Juanita,
I can't see 2 screenshots :(.
But I think the problem is the way you get query var. The
get_query_varshould not be used in this situation as it gets the value from the main query. Please replace the code with:$id = $query->get('relation_id'); $from = $query->get('relation_from'); $to = $query->get('relation_to');Anh Tran
KeymasterHi Peter,
That's quite strange. I've just tried your code and all fields are showing up to me. Here is my screenshot:
https://imgur.elightup.com/55TiHeL.png
Can you check if those fields are not empty? Send me an email with a temporary admin account if you want me to look at the problem closer.
October 22, 2018 at 3:59 PM in reply to: ✅select advanced in Group showing: "Warning : Invalid argument supplied foreach" #11700Anh Tran
KeymasterHi Ale,
I've just checked the options for select_advanced field, looks like it's buggy when put in groups. I'll fix that.
Anh Tran
KeymasterHi Cornwall,
Looks like no boxes causes no data is saved, and thus generate errors when registering the CPT. Can you drop me an email with a temporary admin account to check?
Anh Tran
KeymasterHi Peter,
All fields in all meta boxes are merged and displayed in REST API responses. I see the link https://www.pdpa.co.uk/wp-json/wp/v2/events shows some fields. Can you check that fields come from all meta boxes?
In case there are some fields are missing, please check your code that registers meta boxes. Make sure there's no conditions like:
if ( is_admin() ) { // Or any similar condition add_filter( 'rwmb_meta_boxes', 'your_meta_boxes' ); } - Column
-
AuthorPosts