• Resolved ruchitaj

    (@ruchitaj)


    After upgrade PHP version to 7.4 for WordPress site,
    In custom post type (Properties) we have use meta box fields which map field is not display in admin side but in UI site it shows map with default latitude and longitude.

    array(
                'id'        => "{$prefix}property_address",
                'name'      => __('Property Address','framework'),
                'desc'      => __('Provide property address.','framework'),
                'type'      => 'text',
                'std'       => '1903 Hollywood Boulevard, Hollywood, FL 33020, USA'
            ),
            array(
                'id'            => "{$prefix}property_location",
                'name'          => __('Property Location at Google Map*','framework'),
                'desc'          => __('Drag the google map marker to point your property location. You can also use the address field above to search for your property.','framework'),
                'type'          => 'map',
                'std'           => '26.011812,-80.14524499999999,15',   // 'latitude,longitude[,zoom]' (zoom is optional)
                'style'         => 'width: 600px; height: 400px',
                'address_field' => "{$prefix}property_address",         // Name of text field where address is entered. Can be list of text fields, separated by commas (for ex. city, state)
                'api_key'       => get_option('lux_gmaps_api_key'),
            ),

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support longnguyen

    (@longnguyen)

    Hi,

    There is no issue with your code. Please try to re-save the permalink (post name) and follow some steps below to troubleshoot the issue.

    First: Deactivate all plugins except Meta Box and Meta Box’s extension, switch to the default theme of WordPress (Twenty Twenty One).

    Second: the PHP error. To enable debugging mode for PHP, simply put define( ‘WP_DEBUG’, true ) in your wp-config.php file and see if there are any errors that appear on your screen. To learn more about that, please see this doc. There are also related constants that help you to log the error, which might be useful in some cases.

    Third: the JavaScript error. If you’re using Google Chrome or Firefox, simply press F12 to open the dev tools. Navigate to the Console tab to see if there’s any error. Here is a tutorial for this.

    Let me know how it goes.

    Thread Starter ruchitaj

    (@ruchitaj)

    Hi,
    I followed that steps but Map field still not working for Meta Box plugin

    Plugin Support longnguyen

    (@longnguyen)

    Hi,

    Are there some error messages in steps 2 and 3?

    Please share some screenshots when editing the post and full code that creates custom fields.

    Thread Starter ruchitaj

    (@ruchitaj)

    Hi,
    Did not get any error message in step 2 and step 3.

    Here is the code for configuring meta box fields

    <?php
    /**
     * File Name: config-meta-boxes.php
     *
     * Registering meta boxes
     *
     * All the definitions of meta boxes are listed below with comments.
     * Please read them CAREFULLY.
     *
     *
     */
    
    /********************* META BOX DEFINITIONS ***********************/
    
    /**
     * Prefix of meta keys (optional)
     * Use underscore (_) at the beginning to make keys hidden
     * Alt.: You also can make prefix empty to disable it
     */
    // Better has an underscore as last sign
    $prefix = 'REAL_HOMES_';
    
    global $meta_boxes;
    
    $meta_boxes = array();
    
    // Video Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'video-meta-box',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Video Embed Code','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'post' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'high',
    
        // List of meta fields
        'fields' => array(
            array(
                'name' => __('Video Embed Code','framework'),
                'desc' => __('If you are not using self hosted videos then please provide the video embed code and remove the width and height attributes.','framework'),
                'id'   => "{$prefix}embed_code",
                'type' => 'textarea',
                'cols' => '20',
                'rows' => '3'
            )
        )
    );
    
    // Gallery Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'gallery-meta-box',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Gallery Images','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'post' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'high',
    
        // List of meta fields
        'fields' => array(
            array(
                'name'             => __('Upload Gallery Images','framework'),
                'id'               => "{$prefix}gallery",
                'desc' => __('Images should have minimum width of 830px and minimum height of 323px, Bigger size images will be cropped automatically.','framework'),
                'type'             => 'image_advanced',
                'max_file_uploads' => 48
            )
        )
    );
    
    /* Agents */
    $agents_array = array( -1 => __('None','framework') );
    $agents_posts = get_posts( array( 'post_type' => 'agent', 'posts_per_page' => -1, 'suppress_filters' => 0 ) );
    if(!empty($agents_posts)){
        foreach( $agents_posts as $agent_post ){
            $agents_array[$agent_post->ID] =$agent_post->post_title;
        }
    }
    
    // @ TODO - Reduced price field
    // Property Details Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'property_details',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Property Details','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'property' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'high',
    
        // List of meta fields
        'fields' => array(
            array(
                'name'      => __( 'Gallery Type', 'framework' ),
                'desc'      => __('Select the type of gallery that you want to use for this property images', 'framework'),
                'id'        => "{$prefix}gallery_slider_type",
                'type'      => 'radio',
                'std'       => 'thumb-on-right',
                'options' => array(
                    'thumb-on-right' => __( 'Gallery with thumbnails on right', 'framework' ),
                    'thumb-on-bottom' => __( 'Gallery with thumbnails on bottom', 'framework' )
                )
            ),
            array(
                'name'             => __('Property Gallery Images','framework'),
                'id'               => "{$prefix}property_images",
                'desc' => __('Provide images for gallery on property detail page. Images should have minimum size of 770px by 386px for thumbnails on right and 830px by 460px for thumbnails on bottom. ( Bigger images will be cropped automatically )','framework'),
                'type'             => 'image_advanced',
                'max_file_uploads' => 48
            ),
            array(
                'id'        => "{$prefix}property_price",
                'name'      => __('Property Price','framework'),
                'desc'      => __('Provide Sale OR Rent Price. ( Please only provide digits ) Example Value: 435000','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_price_postfix",
                'name'      => __('Price Postfix Text','framework'),
                'desc'      => __('Text provided here will appear after price. ( You can also leave it empty ) Example Value: Per Month','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_size",
                'name'      => __('Property Size','framework'),
                'desc'      => __('Provide size ( Please only provide digits ) Example Value: 2500','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_size_postfix",
                'name'      => __('Size Postfix Text','framework'),
                'desc'      => __('Text provided here will appear after size. ( You can also leave it empty ) Example Value: Sq Ft','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_bedrooms",
                'name'      => __('Bedrooms','framework'),
                'desc'      => __('Provide number of bedrooms. Example Value: 4','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_bathrooms",
                'name'      => __('Bathrooms','framework'),
                'desc'      => __('Provide number of bathrooms. Example Value: 2','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_garage",
                'name'      => __('Garages','framework'),
                'desc'      => __('Provide number of garages. Example Value: 1','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_id",
                'name'      => __('Property ID','framework'),
                'desc'      => __('Text provided here will be used to search the property directly. ( You can also leave it empty )','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
    		array(
                'id'        => "{$prefix}property_id_old",
                'name'      => __('Old Property ID','framework'),
                'desc'      => __('Text provided here will be used to search the property directly. ( You can also leave it empty )','framework'),
                'type'      => 'text',
                'std'       => ""
            ),
            array(
                'id'        => "{$prefix}property_address",
                'name'      => __('Property Address','framework'),
                'desc'      => __('Provide property address.','framework'),
                'type'      => 'text',
                'std'       => '1903 Hollywood Boulevard, Hollywood, FL 33020, USA'
            ),
            array(
                'id'            => "{$prefix}property_location",
                'name'          => __('Property Location at Google Map*','framework'),
                'desc'          => __('Drag the google map marker to point your property location. You can also use the address field above to search for your property.','framework'),
                'type'          => 'map',
                'std'           => '26.011812,-80.14524499999999,15',   // 'latitude,longitude[,zoom]' (zoom is optional)
                'style'         => 'width: 600px; height: 400px',
                'address_field' => "{$prefix}property_address",         // Name of text field where address is entered. Can be list of text fields, separated by commas (for ex. city, state)
                'api_key'       => get_option('lux_gmaps_api_key'),
            ),
            array(
                'id'        => "{$prefix}tour_video_url",
                'name'      => __('Virtual Tour Video URL','framework'),
                'desc'      => __('Provide virtual tour video URL. Theme supports YouTube, Vimeo, SWF File and MOV File','framework'),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Virtual Tour Video Image','framework'),
                'id'        => "{$prefix}tour_video_image",
                'desc'      => __('Provide the image that will be displayed as place holder and when a user clicks over it the video will be opened in a lightbox. You must provide this image as otherwise the video will not be displayed on property details page. Image should have minimum width of 818px and minimum height 417px. Bigger size images will be cropped automatically.','framework'),
                'type'      => 'image_advanced',
                'max_file_uploads' => 1
            ),
            array(
                'name'	    => __('Mark this Property as Featured', 'framework'),
                'desc'      => __('Marking this property featured will display it in featured properties sections across the theme.', 'framework'),
                'id'		=> "{$prefix}featured",
                'type'		=> 'checkbox',
                'std'		=> 1
            ),
            array(
                'name'      => __( 'Add in Homepage Slider', 'framework' ),
                'desc'      => __('Do you want to add this property in Homepage Slider ? If Yes, Then you also need to provide slider image below.', 'framework'),
                'id'        => "{$prefix}add_in_slider",
                'type'      => 'radio',
                'std'       => 'no',
                'options' => array(
                    'yes' => __( 'Yes ', 'framework' ),
                    'no' => __( 'No', 'framework' )
                )
            ),
            array(
                'name'      => __('Slider Image','framework'),
                'id'        => "{$prefix}slider_image",
                'desc'      => __('Provide the image that will be displayed in Homepage Slider. The recommended image size is 2000px by 700px. You can use bigger or little smaller image but try to keep the same height to width ratio and use the exactly same size images for all properties that will be added in slider.','framework'),
                'type'      => 'image_advanced',
                'max_file_uploads' => 1
            ),
            array(
                'name'      => __( 'What to display in agent information box ?', 'framework' ),
                'desc'      => __('You need to select an agent from select box below, If you are choosing to display an agent\'s information', 'framework'),
                'id'        => "{$prefix}agent_display_option",
                'type'      => 'radio',
                'std'       => 'none',
                'options' => array(
                    'none' => __( 'None', 'framework' ),
                    'my_profile_info' => __( 'Author profile information', 'framework' ),
                    'agent_info' => __( 'Display agent\'s Information', 'framework' )
                )
            ),
            /* Agents */
            array(
                'name'    => __( 'Agent', 'framework' ),
                'id'      => "{$prefix}agents",
                'desc'      => __('Please select related Agent.','framework'),
                'type' => 'select',
                'options' => $agents_array
            ),
            array(
                'id'        => "{$prefix}attachments",
                'name'      => __('Attachments','framework'),
                'desc'      => __('You can attach PDF files, Map images OR other documents to provide further details related to property.','framework'),
                'type'      => 'file_advanced',
                'mime_type' => ''
            ),
            array(
                'id'        => "{$prefix}property_private_note",
                'name'      => __( 'Private Note', 'framework' ),
                'desc'      => __( 'In this textarea, You can write your private note about this property. This field will not be displayed anywhere else.', 'framework' ),
                'type'      => 'textarea',
                'std'       => ""
            )
        )
    );
    
    // Partners Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'partners-meta-box',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Featured Patners Meta','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'partners' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'high',
    
        // List of meta fields
        'fields' => array(
            array(
                'name'             => __('Partner Url','framework'),
                'id'               => "{$prefix}partner_url",
                'desc' => __('Paste here Partner Website link','framework'),
                'type'             => 'text',
            )
        )
    );
    
    // Agent Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'agent-meta-box',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Provide Related Information','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'agent' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'high',
    
        // List of meta fields
        'fields' => array(
            array(
                'name'      => __('Email Address','framework'),
                'id'        => "{$prefix}agent_email",
                'desc'      => __("Provide Agent's Email Address. Agent related messages from contact form on property details page, will be sent on this email address.","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Mobile Number','framework'),
                'id'        => "{$prefix}mobile_number",
                'desc'      => __("Provide Agent's mobile number","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Office Number','framework'),
                'id'        => "{$prefix}office_number",
                'desc'      => __("Provide Agent's office number","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Fax Number','framework'),
                'id'        => "{$prefix}fax_number",
                'desc'      => __("Provide Agent's fax number","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Facebook URL','framework'),
                'id'        => "{$prefix}facebook_url",
                'desc'      => __("Provide Agent's Facebook URL","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Twitter URL','framework'),
                'id'        => "{$prefix}twitter_url",
                'desc'      => __("Provide Agent's Twitter URL","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Google Plus URL','framework'),
                'id'        => "{$prefix}google_plus_url",
                'desc'      => __("Provide Agent's Google Plus URL","framework"),
                'type'      => 'text'
            ),
            array(
                'name'      => __('LinkedIn URL','framework'),
                'id'        => "{$prefix}linked_in_url",
                'desc'      => __("Provide Agent's LinkedIn URL","framework"),
                'type'      => 'text'
            )
        )
    );
    
    // Banner Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'banner-meta-box',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Top Banner Area Settings','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'page','agent' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'default',
    
        // List of meta fields
        'fields' => array(
            array(
                'name'      => __('Banner Title','framework'),
                'id'        => "{$prefix}banner_title",
                'desc'      => __('Please provide the Banner Title, Otherwise the Page Title will be displayed in its place.','framework'),
                'type'      => 'text'
            ),
            array(
                'name'      => __('Banner Sub Title','framework'),
                'id'        => "{$prefix}banner_sub_title",
                'desc'      => __('Please provide the Banner Sub Title.','framework'),
                'type'      => 'textarea',
                'cols'      => '20',
                'rows'      => '2'
            ),
            array(
                'name'      => __('Banner Image','framework'),
                'id'        => "{$prefix}page_banner_image",
                'desc'      => __('Please upload the Banner Image. Otherwise the default banner image from theme options will be displayed.','framework'),
                'type'      => 'image_advanced',
                'max_file_uploads' => 1
            ),
            array(
                'name'      => __('Revolution Slider Alias','framework'),
                'id'        => "{$prefix}rev_slider_alias",
                'desc'      => __('If you want to replace banner with revolution slider then provide its alias here.','framework'),
                'type'      => 'text'
            )
        )
    );
    
    // Property Banner Meta Box
    $meta_boxes[] = array(
        // Meta box id, UNIQUE per meta box. Optional since 4.1.5
        'id' => 'property-banner-meta-box',
    
        // Meta box title - Will appear at the drag and drop handle bar. Required.
        'title' => __('Top Banner','framework'),
    
        // Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
        'pages' => array( 'property' ),
    
        // Where the meta box appear: normal (default), advanced, side. Optional.
        'context' => 'normal',
    
        // Order of meta box: high (default), low. Optional.
        'priority' => 'default',
    
        // List of meta fields
        'fields' => array(
            array(
                'name'      => __('Banner Image','framework'),
                'id'        => "{$prefix}page_banner_image",
                'desc'      => __('Please upload the Banner Image. Otherwise the default banner image from theme options will be displayed.','framework'),
                'type'      => 'image_advanced',
                'max_file_uploads' => 1
            )
        )
    );
    
    // Page title show or hide
    $meta_boxes[] = array(
        'id' => 'page-title-meta-box',
        'title' => __('Page Title','framework'),
        'pages' => array( 'page' ),
        'context' => 'normal',
        'priority' => 'default',
        'fields' => array(
            array (
                'name'      => __('Page Title Display Status','framework'),
                'id'        => "{$prefix}page_title_display",
                'type'      => 'radio',
                'std'       => 'show',
                'options'   => array (
                    'show' => __( 'Show', 'framework' ),
                    'hide' => __( 'Hide', 'framework' )
                )
            )
        )
    );
    
    /********************* META BOX REGISTERING ***********************/
    
    /**
     * Register meta boxes
     *
     * @return void
     */
    function REAL_HOMES_register_meta_boxes()
    {
        // Make sure there's no errors when the plugin is deactivated or during upgrade
        if ( !class_exists( 'RW_Meta_Box' ) )
            return;
    
        global $meta_boxes;
        $meta_boxes = apply_filters('framework_theme_meta',$meta_boxes);
        foreach ( $meta_boxes as $meta_box ){
            new RW_Meta_Box( $meta_box );
        }
    }
    // Hook to 'admin_init' to make sure the meta box class is loaded before
    // (in case using the meta box class in another plugin)
    // This is also helpful for some conditionals like checking page template, categories, etc.
    add_action( 'admin_init', 'REAL_HOMES_register_meta_boxes' );
    
    ?>

    And here is the code for editing the post field.-

    <?php
    $display_google_map = get_option('theme_display_google_map');
    $display_social_share = get_option('theme_display_social_share');
    if($display_google_map == 'true' || $display_social_share == 'true'){
    global $post;
    
        ?>
        <div id="property-map-container" class="map-wrap clearfix">
            <?php
                $property_location = get_post_meta($post->ID,'REAL_HOMES_property_location',true);
                $property_address = get_post_meta($post->ID,'REAL_HOMES_property_address',true);
    
                if( $property_address && !empty($property_location) && $display_google_map == 'true')
                {
    
                    $lat_lng = explode(',',$property_location);
    
                    /* Property Map Icon Based on Property Type */
                    $property_type_slug = 'single-family-home'; // Default Icon Slug
                    $property_marker_icon = '';
    
                    $type_terms = get_the_terms( $post->ID,"property-type" );
                    if(!empty($type_terms)){
                        foreach($type_terms as $typ_trm){
                            $property_type_slug = $typ_trm->slug;
                            break;
                        }
                    }
    
                    if( file_exists( get_template_directory().'/images/map/'.$property_type_slug.'-map-icon.png' ) ){
                        $property_marker_icon = get_template_directory_uri().'/images/map/'.$property_type_slug.'-map-icon.png';
                    }else{
                        $property_marker_icon = get_template_directory_uri().'/images/map/single-family-home-map-icon.png';
                    }
    
                    $property_map_title = get_option('theme_property_map_title');
                    if( !empty($property_map_title) ){
                        ?><span class="map-label">
                            <?php _e($property_map_title, 'framework'); ?>
                        </span><?php
                    }
                    ?>
                    <div id="property_map"></div>
                    <script>
                        /* Property Detail Page - Google Map for Property Location */
    
                        function initialize_property_map(){
                            var propertyLocation = new google.maps.LatLng(<?php echo $lat_lng[0]; ?>,<?php echo $lat_lng[1]; ?>);
                            var propertyMapOptions = {
                                center: propertyLocation,
                                zoom: 15,
                                mapTypeId: google.maps.MapTypeId.ROADMAP,
                                scrollwheel: false
                            };
                            var propertyMap = new google.maps.Map(document.getElementById("property_map"), propertyMapOptions);
                            var propertyMarker = new google.maps.Marker({
                                position: propertyLocation,
                                map: propertyMap,
                                icon: "<?php echo $property_marker_icon; ?>"
                            });
                        }
    
                        window.onload = initialize_property_map();
                    </script>
    
                    <?php
                }
    
                if($display_social_share == 'true'){
    
                    ?>
                    <div class="share-networks clearfix">
                        <span class="share-label"><?php _e('Share this', 'framework'); ?></span>
                        <span><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"><i class="fa fa-facebook fa-lg"></i><?php _e('Facebook','framework'); ?></a></span>
                        <span><a target="_blank" href="https://twitter.com/share?url=<?php the_permalink(); ?>" ><i class="fa fa-twitter fa-lg"></i><?php _e('Twitter','framework'); ?></a></span>
                        <span><a target="_blank" href="https://plus.google.com/share?url={<?php the_permalink(); ?>}" onclick="javascript:window.open(this.href,  '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes')"><i class="fa fa-google-plus fa-lg"></i><?php _e('Google','framework'); ?></a></span>
                        <span><a target="_blank" href="<?=pinterest_share_url($post);?>"><i class="fa fa-pinterest fa-lg"></i><?php _e('Pinterest','framework'); ?></a></span>
                    </div>
                    <?php
                }
            ?>
    
        </div>
    
        <?php
    }
    ?>
    
    <!-- Please call pinit.js only once per page -->
    <script type="text/javascript" async defer src="//assets.pinterest.com/js/pinit.js"></script>

    In custom post type same issue with Property Gallery Images field is not display in admin side.
    Screenshot of Admin side

    • This reply was modified 4 years ago by ruchitaj.
    Plugin Support longnguyen

    (@longnguyen)

    Hi,

    I’ve tried to run your code on my testing site but not see any issue, screenshot https://share.getcloudapp.com/rRuk5jnq.

    Please use the filter rwmb_meta_boxes to register the meta boxes and custom fields. Registering via class RW_Meta_Box is deprecated. Get more details here https://docs.metabox.io/creating-meta-boxes/.

    Then you can deactivate all plugins except Meta Box and switch to the default theme of WordPress (Twenty TwentyOne) to re-check this issue (only use the code to register the meta boxes).

    Thread Starter ruchitaj

    (@ruchitaj)

    Hi Long Nguyen,
    Thank you for support. Now meta box fields are working on admin side and frontend.

    Plugin Support longnguyen

    (@longnguyen)

    If you have any questions, feel free to create a new topic ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Map field is not working for Meta Box plugin’ is closed to new replies.