Ознакомьтесь с документацией для фильтра the_title
Вы должны просто иметь возможность вставить простое if
условие с идентификатором родительской страницы, что-то вроде этого?
function replace_product_child_title( $title, $id = null ){
global $post; // Grab the current WP_Post object
$product_page_id = 12345; // Put the ID of your "Products" page here
// See if this post is a direct child of Products
if( $post->post_parent == $product_page_id ){
// If it is, override the title
$title = "PRODUCTS";
}
// Always return the title
return $title;
}
add_filter( 'the_title', 'replace_product_child_title', 10, 2 );