Hi there, if you want to display custom fields in title, then you need to use custom code in your child theme.
Since you said you have custom field called clinic_places
I would try like this.
add_filter('pre_get_document_title', 'geodir_custom_fields_page_title', 100);
add_filter('wp_title', 'geodir_custom_fields_page_title', 100, 2);
function geodir_custom_fields_page_title($title = '', $sep = '') {
if (geodir_is_page('detail')) {
global $post;
if (isset($post->clinic_places)) {
$title = str_replace('%%cf_clinic_places%%', $post->clinic_places, $title);
}
}
return $title;
}
Please note, custom fields only work with detail pages. So you should use custom field only for “Details page meta title” setting in Title and Meta
If you would like to display clinic places at the end of the title
Just use this format
%%title%% %%sep%% %%cf_clinic_places%%
Basically my code replaces %%cf_clinic_places%% text with origin custom field value.
If you have multiple post types with different custom fields then it gets complicated.