Forum Replies Created
-
AuthorPosts
-
September 6, 2018 at 8:23 AM in reply to: ✅Select taxonomy field is not working from version 4.15.4 #11264
Anh Tran
KeymasterHello,
What do you mean "if it has no taxonomy registered"? Does the field not have a registered taxonomy?
Anh Tran
KeymasterI don't see anything wrong with your code. Are the fields not showing up in the backend?
September 5, 2018 at 4:43 PM in reply to: ✅Is it possible to create a Metabox Group type metabox through API? #11254Anh Tran
KeymasterHello,
It's relatively simple. You just need to:
- Send a
POSTrequest to the endpoint to update a post . - In the array of parameter sent to the server, add a field
meta_boxto store all custom fields' values, including groups. - Put array of group's value into the
meta_boxfield. Remember to format the group value properly, e.g. an array of sub-field's value. In short, send the data in the format when you click the Publish button in the frontend.
Then the plugin will handle the rest and update the post with correct value.
Anh Tran
KeymasterHi Dan,
Just answered you on the Meta Box group on Facebook. I'm posting here for reference:
For custom taxonomy, please use the syntax described in the docs. It's more complicated than the category and tags (caused they're built in and we can define a specific syntax for them).
Anh Tran
KeymasterHello,
Unfortunately, it's not possible at the moment. Although the widgets look similar in term of form fields, its API is very different. And there's no solution for Meta Box yet.
Anh Tran
KeymasterHi,
The
stdis what you want. But it's applied (e.g. show) only when the meta box hasn't saved. So, if you have saved the meta box once, the field won't show thestdvalue. You can check that with new post, where the meta box hasn't been saved and you'll see thestdvalue is showing.Anh Tran
KeymasterHi Joe,
Yes, it's available in the AIO plugin as well. We'll work on the Frontend Submission next week.
Anh
September 1, 2018 at 3:13 PM in reply to: ✅Filter the orderby of entries retrieved from database #11218Anh Tran
KeymasterHi Juanita,
You can overwrite the orderby parameter with this code:
add_filter( 'posts_clauses', function( $clauses, $query ) { $relationship = $query->get( 'relationship' ); if ( ! $relationship || 'REL_ID' != $relationship['id'] ) ) { return $clauses; } $clauses['orderby'] = 'ORDER BY post_date DESC'; return $clauses; }, 99, 2 );It overwrites the
orderbyin the query. You might change it to fit your needs.September 1, 2018 at 3:03 PM in reply to: ✅Possible to get isolated address items for frontend display? #11217Anh Tran
KeymasterYes, the city is just a text field and you can use
[rwmb_meta]shortcode to show it:[rwmb_meta meta_key="city"]For details, please see the documentation.
Anh Tran
KeymasterHello,
I've just tested and the
image_sizeparameter works. Here is a screenshot:https://imgur.elightup.com/9O6rSZB.png
Just a note: when the size specified in
image_sizeparameter is not available, the full size is used. That might be your case.September 1, 2018 at 2:53 PM in reply to: ✅Disable (delete) fields that are hidden conditionally? #11215Anh Tran
KeymasterHello,
Unfortunately, at the moment, CF only hides the fields. Clearing the values might lead to another unexpected behavior: users enter data in field A, and then hide it. After that, they changed their mind and show it. And they might expect the value they already entered.
Let me work on the JS. I think I can add a custom JS event to the field when it's hid, so you can clear the value yourself. This is my idea:
$( 'input' ).on( 'cl_hide', function() { this.value = ''; } );Regarding the issue with Geolocation, I'll check and update. Thanks for letting me know.
Anh Tran
KeymasterJust want to note to this topic: the original bug with switch value is resolved, and the discussion continues here.
Anh Tran
KeymasterYes, button groups act exactly like checkbox list or radio fields, where you specify the buttons' values and labels. So, please enter the buttons as options in the same format.
Anh Tran
KeymasterI have answered these questions via email. I'll post them here in case anyone has a similar problem:
Would storing the Meta Box data in a separate db table keep the relationship with each product ID it was entered on
The answer for this is YES. There's a relationship between the products (posts table) and the custom table. Technically, the value of the custom table's ID column = product (post) ID.
Whats the best approach to something like this?
If what you meant is exporting the data in the custom table when using the export functionality of WordPress, then I have to say it's not supported. WP export feature seems to be limited to custom fields that stored in the
post_metatable only.I have no good solution for this at the moment, as the task of exporting and importing data from custom table along with the product data seems to be complicated. It's best to use some tools or plugins to export the whole database to SQL file. But I guess it's not what you want.
September 1, 2018 at 2:28 PM in reply to: ✅Problem with additional custom field in existing meta box #11211Anh Tran
KeymasterHi Kasia,
Glad that the problem is resolved.
I'm not sure about the bug, neither. Maybe it's some kind of caching / proxy. Some browsers (like Firefox) auto caches the page. So, next time, try to clear the browser cache first.
I'll mark this topic as resolved. If you need any help, please just reply.
- Send a
-
AuthorPosts