No, it doesn’t appear to be possible. At least not directly. You can replace functions in parent themes if they are wrapped in:
if ( ! function_exists( 'get_nav_markup' ) ) {
}
Because child themes are loaded before the parent this gives you an opportunity to define get_nav_markup()
before the parent theme is loaded. That if
statement means that the parent function won’t register the function if you already have in the child theme.
If the parent theme had hooked the function with add_action()
, like this:
add_action( 'hook_name', 'get_nav_markup' );
Then you could have replaced the function by writing your own and hooking it in place of the original function:
remove_action( 'hook_name', 'get_nav_markup' );
add_action( 'hook_name', 'my_get_nav_markup' );
So since the parent theme does not do either of these, your only option is to make the replacement at the template level. You will need to:
- Copy the
get_nav_markup()
function to your child theme, but rename it. Then make whatever change you want to make to it. - Copy the
get_header_markup()
function to your child theme, rename it, and replace the reference toget_nav_markup()
to the renamed and modified copy in your child theme. - Find whichever template uses
get_header_markup()
, presumably header.php, copy it to your child theme, so that it replaces the parent theme’s, and change the reference toget_header_markup()
to your renamed and modified version.