Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
If you use the settings
timestampto save value as timestamp, you can use the helper functionrwmb_meta().$value = rwmb_meta( 'datum' ); echo 'Datum: ' . date( 'F j, Y', $value );Get more details on the documentation https://docs.metabox.io/fields/date/#template-usage
May 4, 2021 at 6:13 AM in reply to: ✅Importing JSON file from other site doesn't work correct #27870Long Nguyen
ModeratorHi Cees,
Can you please share the export file? I will try to import it on my demo site to check the issue.
May 4, 2021 at 6:11 AM in reply to: ✅display image of clonable group uploaded from the frontend #27869Long Nguyen
ModeratorHi Julian,
If your code works with the image uploaded on the backend, you can use the extensions MB Frontend Submission to upload the image on the frontend to show it. Get more details on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/.
Long Nguyen
ModeratorHi,
You can use the Datepicker Options in the Builder to show the format date. Screenshot https://share.getcloudapp.com/yAuDB0By.
There is no format
Y, it should bed-m-y. Get more details on the documentation
https://www.w3schools.com/js/js_date_formats.asp
https://docs.metabox.io/fields/date/May 3, 2021 at 11:18 PM in reply to: ✅Subfields not displaying within Oxygen Custom Field/Meta Options #27859Long Nguyen
ModeratorHi,
Please follow the documentation to know how to get the subfield's value https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-values.
and refer to your topic to run the PHP function with Oxygen https://support.metabox.io/topic/output-shortcode-from-a-custom-field/.
You should have the basic knowledge of coding about PHP, HTML, CSS to do some advanced cases.
Long Nguyen
ModeratorHi,
Did you enable the snippet? Screenshot https://share.getcloudapp.com/d5u12RZG
There are no arguments need to pass to the custom function so you can remove it.
[oxygen data='phpfunction' function='my_custom_function']Long Nguyen
ModeratorHi,
The plugin MB Custom Post Type just helps you to create the custom post type visually with a few clicks instead of using the code https://developer.wordpress.org/reference/functions/register_post_type/.
You can generate the PHP code that creates the CPT and execute it with Code Snippets plugin to re-check the issue.
If it does not work, I recommend contacting Oxygen support to ask for help in this case.
Long Nguyen
ModeratorHi,
Please refer to this topic to know how to run a PHP function in the View https://support.metabox.io/topic/integration-with-search-filter-pro/
May 3, 2021 at 10:40 PM in reply to: ✅How to make a pdf upload field automatically display the pdf #27850Long Nguyen
ModeratorHi Alan,
Thank you for getting in touch.
I think it could be done via PHP code. If you use the field type
fileorfile_upload, please follow the documentation to know how to get the file upload URL.
https://docs.metabox.io/fields/file/#template-usage
https://docs.metabox.io/fields/file-upload/#template-usageThen execute the shortcode in the single post template file. For example
$files = rwmb_meta( 'field_id' ); foreach ( $files as $file ) { $url = $file['url']; echo do_shortcode('[pdf-embedder url="{$url}"]'); }Hope that makes sense.
Long Nguyen
ModeratorHi,
The image URLs are not accessible
http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png
http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.pngCan you please change it to your site URL http://zentyx.ca/?
http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png
http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.pngMay 3, 2021 at 10:13 PM in reply to: ✅Shortcodes - integration with Gutenberg, and how to use them inside a link #27847Long Nguyen
ModeratorHi Sascha,
The layout is controlled by the theme. You can wrap the first shortcode in a group with one column or contact the theme support to ask for help in this case.
Long Nguyen
ModeratorHi Jakub,
You can call any functions in the View via the proxy
mb.function_name().I think you should create your own function by using PHP code to get full support of WooCommerce classes then show the result in the View.Long Nguyen
ModeratorHi,
To get the post thumbnail, you can use the function get_the_post_thumbnail().
For example:
foreach ( $pages as $p ) { echo $p->post_title; echo get_the_post_thumbnail( $p->ID, 'thumbnail' ); }Get more accessible properties of the Post class here https://developer.wordpress.org/reference/classes/wp_post/
Long Nguyen
ModeratorHi Cees,
The helper function rwmb_the_value() does not need to use the
echo, it outputs the content of the field. Your code should change to this<?php $field_id = 'datum'; ?> <span><?php echo "Datum: "?></span><?php rwmb_the_value( $field_id, array( 'format' => 'l j F Y' ) ); ?>Refer to this topic https://support.metabox.io/topic/why-does-echo-rwmb_the_value-display-a-value-twice/
Long Nguyen
ModeratorHi Martin,
Was the relationship ID
jobs_to_clientsregistered on the second site? Or it is just registered on the first site? See more here https://docs.metabox.io/extensions/mb-relationships/#creating-relationships -
AuthorPosts