If you want to change only the text you can hook into default_page_template_title
add_filter('default_page_template_title', 'bt_change_default_page_template_title', 10, 2);
function bt_change_default_page_template_title ($text, $meta) {
if ($meta === 'meta-box') return 'My custom template';
return $text;
}
Add this code into functions.php
and thats it.
Tested on a clean wordpress install, this will only change the text and nothing else, functionality will remain the same.
Update
To get this filter to work with ACF we need to make a few changes.
- ACF doesn’t pass a second argument when using the filter so we need to assing a default value to our second parameter
- Update our condition to take that new, empty, parameter into account
add_filter('default_page_template_title', 'bt_change_default_page_template_title', 10, 2);
function bt_change_default_page_template_title ($text, $meta="") {
if ($meta === 'meta-box' || empty($meta)) return 'My custom templatee';
return $text;
}