WordPress.org

Ready to get started?Download WordPress

Forums

[Events Manager] Possible to add custom fileds to locations (2 posts)

  1. jester48
    Member
    Posted 2 years ago #

    I have been through the tutorials for adding custom fields to an event, is there anything similar for adding custom fields to a location?

    i tried

    function my_em_location_type_metabox(){
    	global $EM_Location;
    	$my_em_location_type = get_option('my-em-location-type');
    	?>
    	<div id="event-styles" class="stuffbox">
    		<h3>Location Type</h3>
    		<div class="inside" style="padding:10px;">
    
    			<label><input type="text" name="location_type" value="<?php echo $EM_Location->location_type; ?>" /></label>
    
    		</div>
    	</div>
    	<?php
    	}
    
    add_action('em_admin_locations_form_side_footer','my_em_location_type_metabox');
    add_action('em_front_locations_form_footer','my_em_location_type_metabox');

    but no joy

    also, how do you make a custom field required?

    thanks

    Jester

  2. brufforeilly
    Member
    Posted 2 years ago #

    I would really like to know how to do this - would be great to have more than one 'description' field for Locations.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic