Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Please follow this documentation to know how to create a custom sanitize callback and use it when creating a field.
https://docs.metabox.io/sanitization/#custom-sanitize-callbackLong Nguyen
ModeratorHi,
There is no prebuilt option that supports showing the list categories and sub-categories like that. You can follow this documentation to run a PHP function in View
https://docs.metabox.io/extensions/mb-views/#running-php-functionsthen get the categories by using the function get_terms() or get_categories().
Long Nguyen
ModeratorHi Steve,
Do you mean the Plural name and Singular name? I see it still works, screenshot https://share.getcloudapp.com/12uveGw5.
After creating a CPT, please try to re-save the permalink to flush the cache.
Long Nguyen
ModeratorHi Fernando,
If Zapier works with the normal field of the default post, it would work with the custom fields created by Meta Box. Can you please re-check?
Long Nguyen
ModeratorHi,
I got the issue. The tab
userin the View support getting the meta of logged-in user. If you want to get the user meta from a user, please use the helper functionrwmb_meta(). Get more details on this documentation
https://docs.metabox.io/extensions/mb-user-meta/#getting-field-value
https://docs.metabox.io/extensions/mb-views/#running-php-functionsFor example
{% set user_image = mb.rwmb_meta( 'zdjecie', {object_type: 'user'}, 1 ) %} <img src="{{user_image.url}}" >Long Nguyen
ModeratorHi,
You need to have a basic knowledge of coding to create the shortcode. There are some guides for you:
- Follow this document to get posts by taxonomy https://developer.wordpress.org/reference/functions/get_posts/
- Use the PHP function in the View https://docs.metabox.io/extensions/mb-views/#running-php-functions
- Then set the location type: shortcode https://docs.metabox.io/extensions/mb-views/#locationsJuly 31, 2021 at 10:53 PM in reply to: ✅MB Relationship WP_Query no longer works in Meta Box AIO 1.14.1 and 1.14.2 #29818Long Nguyen
ModeratorHi Paul,
Can you please check a post Episode if that is connected to a post Podcast when editing the post? It is possible that the connection is not set then the query does not find the post connected.
If you call the method
addin your class, it should be hooked to the actionmb_relationships_initadd_action( 'mb_relationships_init', function () { MB_Relationships_API::add( 123, 456, 'podcasts_to_episodes'); } );Long Nguyen
ModeratorHi Nicholas,
-
It is correct to enqueue the script file for the field.
-
Please be aware that the field value saved in the database is the image ID, it is different from the raw code. I think after get the image URL, you can follow this topic to encode the URL https://wordpress.stackexchange.com/questions/288667/need-to-convert-image-url-to-a-base-64-data-url-with-wordpress-function
July 31, 2021 at 9:19 AM in reply to: Custom fields in Dynamic Tabs - OxyExtras - Oxygen Builder #29814Long Nguyen
ModeratorHi,
Oxygen Builder is not fully compatible with Meta Box so you need to create a shortcode or a function that returns a URL to show images in the Oxygen Builder. Please refer to these topics
https://support.metabox.io/topic/retrieving-single-image-url-in-oxygen-builder/
https://support.metabox.io/topic/use-customfield-image-as-background-in-oxygen/Or the sample shortcode https://docs.metabox.io/shortcode/#examples
Long Nguyen
ModeratorHi Jerome,
Would you mind telling us what doesn’t work for you? If you have any feedback, suggestions for us, we would love to hear that.
Thanks.
Long Nguyen
ModeratorHi Zoro,
Thank you for contacting us.
For example, you can wrap the field value in a
<a>tag and a<button>tag to make the button clickable.<a href="<?php echo rwmb_meta( 'field_URL_id' ); ?>"> <button>Click me!</button> </a>Please follow this documentation to know how to output the field value https://docs.metabox.io/displaying-fields/.
AIO means All In One, just need to activate this plugin to use all extensions here https://metabox.io/plugins/
Long Nguyen
ModeratorHi,
No, it's not encouraging to change the post ID of WordPress. The post ID is auto-increment and unique for each post so you do not need to change it. You can create a custom field and add any field type to the posts if you want to distinguish them.
Long Nguyen
ModeratorHi Kirb,
You can use the JavaScript code to append text to the selected option. Please refer to this topic https://stackoverflow.com/questions/43444376/how-do-i-append-text-to-the-end-of-a-select-options-text-using-jquery/43444656
Long Nguyen
ModeratorHi,
It's not the problem of the plugin itself, just a conflict slug of WordPress when a CPT and page have the same slug. Then WordPress will load the page with high priority and there is no child page with this URL
/states/abcdSo you need to change the page slug or change the CPT slug to avoid this conflict.
July 30, 2021 at 11:34 AM in reply to: ✅MB Relationship WP_Query no longer works in Meta Box AIO 1.14.1 and 1.14.2 #29775Long Nguyen
ModeratorHi Paul,
I've tested the query by relationship again but not see any issue. Can you please share the code that creates the relationship? And re-check the episode posts are published.
-
-
AuthorPosts