Forum Replies Created
-
AuthorPosts
-
Aishwarya
ParticipantHi,
Thanks for checking it out. But you have commented on the fields array
shopily_custom_fieldsand prevented it from displaying. Check it by enabling the field in the code but without adding data from the browser by clicking "Add field".Hope you understand!
Aishwarya
ParticipantHi,
Sure
//Add Metabox settings page under Products menu add_filter( 'mb_settings_pages', function ( $settings_pages ) { $settings_pages[] = array( 'id' => 'shopily-extra-fields', 'option_name' => 'shopily_product_fields', 'menu_title' => esc_html__( 'Extra details', 'shopily' ), 'icon_url' => 'dashicons-edit', 'style' => 'no-boxes', 'columns' => 1, 'parent' => 'edit.php?post_type=product', ); return $settings_pages; } );// Register meta boxes and fields for settings page add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'shopily-custom-fields', 'title' => esc_html__( 'Product specification details', 'shopily' ), 'settings_pages' => 'shopily-extra-fields', 'customizer' => false, 'fields' => array( array ( 'id' => 'shopily_custom_fields', 'type' => 'text', 'name' => esc_html__( 'Add field', 'shopily' ), 'label_description' => 'Label description', 'desc' => esc_html__( 'To add your own specification, just type in the label by not selecting the select option.', 'shopily' ), 'clone' => true, 'placeholder' => esc_html__( 'Enter field label', 'shopily' ), 'size' => 30, 'datalist' => array( 'id' => 'shopily_default_fields', // List of predefined options 'options' => array( esc_html__( 'Material', 'shopily' ), esc_html__( 'Type', 'shopily' ), esc_html__( 'Added date', 'shopily' ), ), ), ), ), ); return $meta_boxes; } );This is the code. When I add a field from the settings page, the error goes away because the foreach has some value to iterate.
September 22, 2019 at 3:19 PM in reply to: โ Can we add wrapper div or class name to existing wrapper div for Settings markup #16227Aishwarya
ParticipantHi Anh,
Thank you so much for adding the feature. Really appreciated and love your great work.
Best Regards,
AishwaryaSeptember 19, 2019 at 11:31 PM in reply to: โ Can we add wrapper div or class name to existing wrapper div for Settings markup #16201Aishwarya
ParticipantHi Anh,
Any updates on addition of unique class name to the settings page?Best Regards,
AishwaryaJuly 31, 2019 at 9:36 PM in reply to: โ Can we add wrapper div or class name to existing wrapper div for Settings markup #15529Aishwarya
ParticipantHi Ann,
Thank you for taking my request.
Do you mean like
<div class="wrap my-theme-settings">this?Ah, yes it can work but if you can add a inner div, it will be more convenient to style it more better. like
<div class="wrap"><div id="my-theme-settings">But both methods are ok for me, whichever you think possible to add.
Best Regards,
Aishwarya -
AuthorPosts