The following code inserts a hint on all subpages of a domain if a certain string is present within the URL.
function add_code_to_body() {
if (strpos($_SERVER['REQUEST_URI'], 'zeichenfolge-in-der-url') !== false){ ?>
<div style="background-color:#000;color:#fff;font-size: 17px;padding: 8px;text-align: center;">Here comes the hint.</div>
<?php }
}
add_action( 'wp_body_open', 'add_code_to_body' );