Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Please share your admin site account via this contact form https://metabox.io/contact/. I will take a closer look and give a quick response.
Long Nguyen
ModeratorHi,
Please follow this article to know how to display many locations in map with some code https://metabox.io/display-all-listings-on-a-map/.
Hope it helps.
June 16, 2020 at 10:21 AM in reply to: Can a Taxonomy using select_tree have a different placeholder in each hierarchy? #20378Long Nguyen
ModeratorHi Sean,
Because both state and store (child term) are terms of the taxonomy name Store so the placeholders of select tree field type only support to show the text "Select a Store". But thanks for your idea, I will create a feature request to support showing the different text for child terms.
June 16, 2020 at 9:57 AM in reply to: ✅Customizer Draft/Schedule Does not work with MB Settings Values #20377Long Nguyen
ModeratorHi,
Please see my screen record https://www.loom.com/share/251a84c0c38146ce9ba83ddfbcf4de75. The field of MB Settings Page shows on the Schedule or Draft mode preview as well.
Long Nguyen
ModeratorHi,
This problem is so weird, you can try to move the
groupfieldbutton_templateabove the fieldhome_template. Here is the code https://pastebin.com/N9GFCjt5.I will take a deep digger to this problem and let you know later.
Long Nguyen
ModeratorIf you want to compare a variable with a text, you have to wrap it in the single/double quotes.
{% set termList = mb.get_the_terms( post.ID, 'category' ) %} {% set cat = termList[0].slug %} {% if cat == 'archives' %} <p> Test </p> {% endif %}Long Nguyen
ModeratorHi Michael,
Please follow some steps to check the view:
- Deactivate all plugins except Meta Box and Meta Box AIO.
- Move to trash all View items that you created.
- Create new views and set location for Single Edition, Archive Edition pages again.
- Switch to the default theme of WordPress Twenty Nineteen (optional).
and it would be better if you make a screen record while doing steps with Loom then share the link here.
Long Nguyen
ModeratorHi,
This code
{% set termList = mb.get_the_terms( post.ID, 'category' ) %} {{ termList[0].slug }}shows the first category slug of the current post as well, please see my screen record https://www.loom.com/share/b520a8d8fe63414081f790e584c5dac2. Could you please clear the cache and check the code again?
Long Nguyen
ModeratorHi,
It is impossible, the class WP_User_Query does not accept the argument
idand if you want to pass a function as a value of an argument, please use the code.'query_args' => array( 'role__in' => 'Administrator', 'include' => get_current_user_id(), ),And follow the documentation to know the list of accepted arguments.
https://developer.wordpress.org/reference/classes/wp_user_query/prepare_query/
https://docs.metabox.io/fields/user/#sample-codeLong Nguyen
ModeratorHi,
Could you please go to Admin dashboard -> Settings -> Permalinks -> Save the current settings again? Then check the archive edition page or single edition page again.
I've tested your code in my local site, it works as well, see my screen record https://www.loom.com/share/7816d7cc51404da2a59c135bc0ddadc5.
Long Nguyen
ModeratorHi Ryan,
Recently we've created an update to validate the field if it is visible. If a field is hidden by conditional logic, it will be ignored when running the validation. I'm going to create a request to support this case if the user needs to validate the hidden fields.
Long Nguyen
ModeratorHi,
Regarding the view, did you select the location Post for the view? Please see my screen record https://www.loom.com/share/98b1bd2c135c4fd2816d8cedd0ff8447, your code renders the table on the single post as well.
Regarding the warning error, please share the code that you are using to create fields. I will take a closer look and give a quick response.
Long Nguyen
ModeratorHi,
The shortcode seems does not render in the response of Ajax call, you can try to load the shortcode inside the function
wp_localize_script().wp_localize_script( 'script-handle', 'pluginObject', array( 'mbView' => do_shortcode('[mbv id="9865"]') ) );For more information, please follow this guide https://wordpress.stackexchange.com/questions/121560/do-shortcode-inside-ajax-callback.
Long Nguyen
ModeratorHi,
Please see my screen record https://www.loom.com/share/cc9c10981c964dcaaf61aa597dda9cc9.
I've created a file
composer.jsonin a theme folder, run the commandcomposer installthen require the filevendor/autoload.phpin the filefunctions.php. It works as well as a library.{ "repositories":[ { "type": "composer", "url": "https://wpackagist.org" } ], "require": { "wpackagist-plugin/meta-box": "dev-trunk" }, "extra": { "installer-paths": { "vendor/meta-box/meta-box": ["wpackagist-plugin/meta-box"] } }, "autoload": { "files": [ "vendor/meta-box/meta-box/meta-box.php" ] } }Long Nguyen
ModeratorHi,
The property term ID of the object WP_Term is
term_id, you can change the code toterm.term_id. And the functionget_term_childrent()returns an array of child term IDs so you should follow a basic example to get the child term name.For more information, please follow the documentation.
https://developer.wordpress.org/reference/classes/wp_term/
https://developer.wordpress.org/reference/functions/get_term_children/ -
AuthorPosts