Forum Replies Created
-
AuthorPosts
-
September 5, 2023 at 10:58 PM in reply to: Custom post type has comments disabled but still receiving comments #43148
Peter
ModeratorHello,
I'm not sure why you are still receiving comments even though the comment form is not available in the frontend. You can try to use a third-party plugin and see if it helps.
https://wordpress.org/plugins/disable-comments/Peter
ModeratorHello,
I think it is possible. You can create your own custom JS code and listen to the submit button, when the action click is fired, run your own code to validate the field.
Otherwise, you can look for a PHP library or snippets and use the callback function to validate/sanitize the field value.
Peter
ModeratorHello,
Are you using the WYSIWYG field? I don't see the
[embed]added to this field value, it adds the HTML tag<img>. However, you can follow the documentation to render the shortcode in the field content
https://docs.metabox.io/fields/wysiwyg/#template-usagePeter
ModeratorHello Laurent,
There are two fields that have the same ID
usure. The field ID must be unique, follow the documentation https://docs.metabox.io/field-settings/Regarding the modele/marque field, please export the field group to a JSON file and share it here. I will take a look. Follow the documentation
https://docs.metabox.io/extensions/meta-box-builder/September 4, 2023 at 9:40 PM in reply to: ✅Reorder Post manually not showing in the correct order #43133Peter
ModeratorHello Felix,
How do you display posts and order them by field value? If you are using the code, please follow the documentation https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
September 4, 2023 at 9:18 PM in reply to: ✅How to get render_callback() have a dynamic output? #43132Peter
ModeratorHello,
I use the
time()function in the code block but do not save the time to the post content (a field value), the current timestamp displays correctly. Here is the screen record
https://drive.google.com/file/d/1atXi3wDdh67Jszpg6KQEj2Ir1zT5lb4A/view?usp=sharingCan you please share some screenshots of block settings on your site?
Peter
ModeratorHello John,
Please export the field group to a JSON file and share it here with some screenshots of the issue, I will try to import it to my demo site and check the issue there.
Refer to the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--importPeter
ModeratorHello,
Please try to remove the wpautop option in your code and recheck this issue
'options' => [ 'wpautop' => true, ],I removed it and the
<p>tags are added properly on my demo site.September 4, 2023 at 6:42 PM in reply to: ✅Custom Field content no longer editable/viewable in WordPress admin area #43129Peter
ModeratorThanks for your feedback.
I will share this with the development team to improve GUI of the builder.
Peter
ModeratorHello,
I see the
attribute()function returns the value correctly on my demo site. You can use the WordPress functionget_option()as you do or the Meta Box helper functionrwbm_meta()to get a settings page value. Refer to the documentation https://docs.metabox.io/extensions/mb-settings-page/#getting-field-valueSeptember 4, 2023 at 6:23 PM in reply to: How to display parent custom field in Views Shortcode for child post #43127Peter
ModeratorHello,
You said the field ID is
cover_corsobut you added the field ID in your code:cover-corso. The attribute of thecatalog_post, notpost. And I also do not see the code to output the image in the catalog post loop.If you are not able to complete the task, please contact us here https://metabox.io/contact/
Our development team will help you with an extra fee.August 31, 2023 at 11:09 PM in reply to: How to display parent custom field in Views Shortcode for child post #43109Peter
ModeratorHello,
So you can use another query to get the related catalog post from the session post ID. For example:
{% for post in posts %} {# get the course catalog post #} {% set catalog_args = { post_type: 'course_catalog', relationship: { id: 'catalog-to-session', to: post.ID } } %} {% set catalog_posts = mb.get_posts( catalog_args ) %} {% for catalog_post in catalog_posts %} {# get the catalog post image and other info #} {% endfor %} {% endfor %}You will need to change the post type and relationship ID with your own, just for example.
August 31, 2023 at 10:59 PM in reply to: ✅get_users() not showing the correct order of relationship #43108Peter
ModeratorHello,
Thanks for your feedback.
There is an issue with the order of connected users when displaying them in the frontend. I've escalated this issue to the development team to fix it. I will let you know when I have any information.
Peter
ModeratorHello Joe,
If you are on the single product page, you can use the function get_the_title() to get the current product title, assign it to a variable and output it in your code. For example:
$current_product_title = get_the_title(); $connected = new WP_Query( [ ] ); ...Peter
ModeratorHello,
I see you use the function
get_post_meta()to get the custom field value, so you can use the functionget_option()to get the option value (settings page).Or use the helper function
rwmb_meta(), follow the documentation https://docs.metabox.io/extensions/mb-settings-page/#getting-field-value -
AuthorPosts