There are filters you can use to add custom schema markup values.
1 – citybook_schema_listing_metas
You can add your own value string ( {{custom_value}} ) to filter $values variable then return modified values. The $values variable is an array with key is listing meta tag, value is string.
add_filter( 'citybook_schema_listing_metas', function($values){
$values['{{custom_value}}'] = 'Your custom value';
return $values;
} );
Then the value will display on listing values dropdown for selecting
2 – citybook_schema_value
This filter receive three variable
- value – schema value. Ex: {{custom_value}} if your new custom value is selected
- listing_id – listing post id to get data from
- name – schema markup name. Ex: openingHours for opening hours field, or aggregateRating/@type for aggregate rating then @type field.
add_filter( 'citybook_schema_value', function($value, $id, $name){
if($value == '{{custom_value}}' && $name == 'telephone' ){
$value = get_post_meta( $id, '_cth_contact_infos_phone', true );
}
return $value;
}, 10, 3 );
Watch how to add schema markup to your listings at this doc