The following code display a top bar with a custom message and a link on all the website.

The following code must be added to the function.php file of the theme (better if is a child-theme). Optionally you can create a custom plugin.

function al_add_custom_top_bar () {
    // if you have WPML the code below will allow to get the permalink of the translated page
    // change "1234" with the ID of the page in the base language
    //$permalink = apply_filters( 'wpml_permalink', get_permalink(1234) , ICL_LANGUAGE_CODE ); 
    
    // if you have a specific page you can use the code below
    // change "1234" with the ID of your page.
    //$permalink = get_permalink(1234);

    $permalink = 'http://www.mysite.com/my-page/';

    $message = sprintf(__('Do you want to do a project with us? <a href="%s">Click here</a> to know how...', 'ego-wc-fs'), $permalink);
    ?>
    <script language="javascript" type="text/javascript">
        var elem = document.createElement('div');
        var content = document.createTextNode("<?php echo $message; ?>");
        elem.style.cssText = 'position:absolute;width:100%;height:100%;opacity:0.3;z-index:100;background:#000';
        elem.classList.add('al-top-bar');
        elem.appendChild(content);
        document.body.appendChild(elem);
    </script>
    <?php
}
add_action( 'wp_footer', 'al_add_custom_top_bar', 1000 );

Accolore

Web developer, Wordpress enthusiast, father of two splendid girls.