Reply To: how to specify which property the calendar/form widget

Thanks that’s getting it close.

Here’s what I did to make it work good enough. At least now the select menu is auto selected to match the page title.

Maybe you could point out where I’ve been ignant.

global $post;
$slug = get_post( $post )->post_name;
$propertyID = get_post_id( $slug, 'easy-rooms' );
$theForm=str_replace('['.$fields.']', $propertyID . ''.easyreservations_resource_options($propertyID, 0).'', $theForm);

and the get_post_id()

function get_post_id( $slug, $post_type ) {
$query = new WP_Query(array('name' => $slug, 'post_type' => $post_type));
return get_the_ID();