• Resolved ronliu2k

    (@ronliu2k)


    Hi,

    I try to place a location picker via google map into a post type, but doesn’t work out, it just shows name and desc but no any buttons. My code is:

    $meta_boxes[] = array(
    		'id'       => 'product_information',
    		'title'    => 'Product Information',
    		'pages'    => array( 'ptd_product'),
    		'context'  => 'normal',
    		'priority' => 'high',
    
    		'fields' => array(
    			array(
    				'name'  => 'Number of days',
    				'desc'  => 'How many days this travel product includes?',
    				'id'    =>  'numberOfDays',
    				'type'  => 'number',
    				'std'   => '2',
    			),
    			array(
    				'name'             => 'Location',
    				'desc'             => 'Where it is exactly located, pick it up in map',
    				'id'               => "location",
    				'type'             => 'map',
    			),
    		)
    	);

    https://wordpress.org/plugins/meta-box/

Viewing 1 replies (of 1 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi,

    The map uses another text field to fetch the address, so the map field can’t go alone. This demo file shows how to implement the map field, please take a look.

    Best regards

Viewing 1 replies (of 1 total)
  • The topic ‘How does 'map' work in admin side?’ is closed to new replies.