Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
There are three options to render the view:
- The whole page layout, including header and footer: that means all sections header, main content, footer will be replaced by the view content.
- The layout between header and footer: that means the section main content (post content and sidebar) between the header and footer will be replaced by the view content.
- Only the post content area: that means only the post content will be replaced by the view content, keep the section sidebar.
See my screenshot to get more details https://share.getcloudapp.com/qGuleZzO.
Long Nguyen
ModeratorHi,
I think this question is beyond the scope of supporting Meta Box and extensions. It would take a lot of code to do with PHP and JavaScript (AJAX).
So I recommend using the child term to show the parent and child term on the CPT by using the field taxonomy or taxonomy_advanced to create select options for users to select item (parent) and colors red, orange, purple (child term) with the field type
select_treeorcheckbox_tree.Long Nguyen
ModeratorHi,
You can use this code to get the post ID when registering the meta box
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $prefix = ''; $post_id = null; if ( isset( $_GET['post'] ) ) { $post_id = intval( $_GET['post'] ); } elseif ( isset( $_POST['post_ID'] ) ) { $post_id = intval( $_POST['post_ID'] ); } $meta_boxes[] = [ ... 'fields' => [ [ 'id' => $prefix . 'field_id', 'type' => 'text', 'name' => esc_html__( 'Text Field', 'text-domain' ), 'attributes' => [ 'value' => $post_id ], ], ], ]; return $meta_boxes; }Refer to this topic https://support.metabox.io/topic/dynamic-created-metaboxes-for-specific-pages-are-not-saving-using-only-code/.
But this feature does not support the field
hidden, the following field is supportedtext,url,email,checkbox,radio,date,time,datetime,number. Get more details in the documentation https://docs.metabox.io/custom-attributes/.Long Nguyen
ModeratorHi,
You can check if the data is not empty then show the link
if( !empty( $user->facebook ) ) { <a href="<?php echo $user->facebook; ?>" target="_blank" class="sl-item fa fa-facebook"></a> ... }Long Nguyen
ModeratorHi there,
The extension MB User Profile (MBUP) helps you to create the user meta for users when editing users in the backend. In the frontend, MBUP has its own shortcodes to create a register/login/profile form while Restrict Content Pro (RCP) also has its own same shortcodes.
So I think you can use both MBUP and RCP to create a form in a specific case if you want. To create custom fields for the RCP form, please follow its documentation https://help.ithemes.com/hc/en-us/articles/360053124813.
Long Nguyen
ModeratorHi,
Please try to deactivate all plugins except Meta Box, MB extensions and switch to the default theme of WordPress (Twenty Twenty One) then check this issue again.
Follow the step Debugging Information to debug this issue. If it does not show anything, please do the step Private Website Info https://support.metabox.io/topic/how-to-create-a-new-topic/.
January 15, 2021 at 9:23 PM in reply to: ✅Display relationship fields into custom post types edit page #24042Long Nguyen
ModeratorHi,
The MB Relationships extension only helps you to create a relation between posts, terms, and users. You can follow the documentation to get the connected user then get orders or related information from the user ID. Get more details on this topic https://stackoverflow.com/questions/51980040/get-all-orders-and-orderdata-of-a-single-customer-in-woocommerce-by-user-id.
January 15, 2021 at 12:30 PM in reply to: ✅Is the "plugin auto update" feature working for MB AIO? #24030Long Nguyen
ModeratorHi,
The feature Auto-Update of WordPress also works for Meta Box AIO, screenshot https://share.getcloudapp.com/NQuKPBzZ.
Or you can use the filter
add_filter( 'auto_update_plugin', '__return_true' );to enable auto-update for all plugins. See more in this documentation https://wordpress.org/support/article/configuring-automatic-background-updates/#plugin-theme-updates-via-filter.
Long Nguyen
ModeratorHi,
As I see in your code, you are trying to show the list of taxonomies name base on the option
$accessibility_nameand each taxonomy should belong to its parent when showing on the frontend.So I think you can use the argument
'hierarchical' => truewhen registering the taxonomy which has descendants like categories.Then use the field taxonomy or taxonomy_advanced to create select options for users to select type (term) and solution (child term) with the field type
select_treeorcheckbox_tree.After saving the option (taxonomy), you can use the function get_terms() to get all term (type) and child terms (solution) with the hierarchical as you want.
January 14, 2021 at 6:06 PM in reply to: ✅best solution to search in custom tables, and post relationships, and native wp #24025Long Nguyen
ModeratorHi,
The extension MB Custom Table has not supported to store whole a post object to a custom table yet. We are trying to create a new update to support it.
To export/import the data in the custom table, I think the simple way is to use the option export/import of phpMyAdmin. Or use the plugin WP All Import and follow this topic https://wordpress.org/support/topic/import-to-custom-table/.
Regarding the filter map by Facet, it has not worked. I've created a feature request to the developer team to cover this case.
Long Nguyen
ModeratorHi,
Please update the new version of MB Custom Table 1.1.12 to update an empty field.
January 14, 2021 at 12:39 PM in reply to: ✅best solution to search in custom tables, and post relationships, and native wp #24021Long Nguyen
ModeratorHi,
FYI, FacetWP is also compatible with the custom table to create a filter that searches the field's value in the custom table. Refer to this topic: https://support.metabox.io/topic/facetwp-custom-table/.
But for the sub-fields inside a group, you need to use the SearchWP to search for sub-fields value. Follow this article https://metabox.io/searchwp-metabox-integration/.
Long Nguyen
Moderator@hartsook:
I'm not sure the way ACF saves the complicated fields but for the simple fields such as
text,number,email... you can just create a Meta Box's custom field with the same field ID (ACF Field Name) and the corresponding field type to use the current field value of the post then deactivate the plugin ACF.Refer to this topic https://support.metabox.io/topic/is-it-possible-to-move-all-cpt-and-cf-data-from-pods-to-metabox/.
Long Nguyen
ModeratorHi Ben,
The field checkbox helps you to create a checkbox on the backend when editing a post (or post type) then show the value on the frontend with the helper function rwmb_meta(). You can create a condition to show something on the frontend if the box is checked on the backend.
$value = rwmb_meta( $field_id ); // If field is checked. if ( $value ) { echo 'Checked'; // Do something. } // If field is unchecked. else { echo 'Unchecked'; // Do something else. }January 13, 2021 at 9:22 AM in reply to: ✅Why does `echo rwmb_the_value` display a value twice? #24005Long Nguyen
ModeratorHi,
For example:
function yourStatus(){ echo ' Done'; } echo 'Status ='. yourStatus();your output will look like this
"DoneStatus ="instead of
"Status = Done"Echo in a function is to send a value to the output buffer and echo the function to send it's output to the output.
There is an echo inside the helper function
rwmb_the_value()so the value will print twice. See more in the source code: https://github.com/wpmetabox/meta-box/blob/master/inc/functions.php#L181-L208 -
AuthorPosts