Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorI understand the issue, in the admin area, WordPress does not support displaying 2 fields with the same ID on a page. In the frontend, with the frontend submission form, it works properly.
In this case, I recommend removing the standard featured image section of WordPress to show the custom field created by Meta Box. If you create the CPT by Meta Box, you can go to Meta Box > Post Type > Edit the post type > Support tab > Disable option "Thumbnails".
Peter
ModeratorHello Yasmine,
Can you please share the code that creates the custom fields on your site? I recommend using this code to output a variable if you do not know what could be the value.
echo "<pre>"; print_r( $variable ); echo "</pre>";Peter
ModeratorIf you want to get the post meta, you need to use the function get_posts().
Regarding the custom avatar field, can you please let me know how did you register the custom field and the code that output the field value?
Peter
ModeratorNot yet, the development team is working on this issue. I will let you know when it is fixed.
Peter
ModeratorHello Denise,
Please follow these steps to create and use the template for your CPT
1. When registering the CPT, enable the option
Page attributesin the Supports tab.2. Create a template file with the CPT slug in the file name. For example, CPT slug:
job
file name: template-job.php
content<?php /* Template Name: Job Template Post Type: job */ get_header( 'review' ); ?> content here ... <?php get_footer();Peter
ModeratorHello Sascha,
When creating the CPT, on the tab Support, you can disable the option
Editoror use this custom PHP code to remove the content area of a post/post type// Remove the editor. Change 'post' to your custom post type. add_action( 'init', function () { remove_post_type_support( 'post', 'editor' ); } );Get more details on the WordPress documentation https://developer.wordpress.org/reference/functions/remove_post_type_support/
November 11, 2022 at 9:53 PM in reply to: Open Street Map (Custom Style) not visible on frontend #39077Peter
ModeratorHello there,
To display a map subfield in a group with the custom style, you need to use the PHP code, the Twig code in the View is not supported in this case. Refer to this topic https://support.metabox.io/topic/using-a-open-street-map-with-an-address-text-field-inside-a-group/
Peter
ModeratorThe argument
publicshould be set totrueorfalse. You can create a test taxonomy with the tool Online Generator and combine it with your code https://metabox.io/taxonomy-generator/November 11, 2022 at 5:46 PM in reply to: ✅Metabox breaks when adding additional fields in Field Group #39071Peter
ModeratorGreat.
Let me know if you have any questions.Peter
ModeratorHello there,
Yes, you can use the existing table for a new custom post type. When creating the custom fields for the post type, please use the field IDs that match with the column name in that table. You can read more on the documentation https://docs.metabox.io/extensions/mb-custom-table/#using-existing-tables
Peter
ModeratorHello Yasmine,
If you want to display a list of users on the frontend with Elementor page builder, you can create a field
userfor a post and select some users. It works like other select fieldspostandtaxonomy.If you want to display a list of users by coding, please use the WordPress function get_users().
Peter
ModeratorHello Macky,
The field
textareadoes not save the line breaks to the database, you have to add the HTML tag<br>or newline character\nto display the line breaks on the frontend.Peter
ModeratorHello Arno,
Please generate the PHP code from the builder and add the code to the file functions.php in the theme/child theme folder to create the custom taxonomy and deactivate all plugins (including Meta Box plugins) and recheck this issue. Let me know if the issue is resolved.
Peter
ModeratorYou can access the field value on submitted through the global variable $_POST. For example:
$_POST['field_id']Peter
ModeratorHello Pat,
There is no option to update the relationship field automatically, you need to manually select it. Or if you are familiar with coding, you can follow this documentation to know how to create relations programmatically https://docs.metabox.io/extensions/mb-relationships/#creating-connections-programmatically
-
AuthorPosts