Editing a PHP file to include a small text piece on every page

You should provide your code when asking this type of question. Here is an example of a header.php file. Look at the code and see how it’s done:

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title>
<?php
    global $page, $paged;
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) )
    echo " | $site_description";
    if ( $paged >= 2 || $page >= 2 )
    echo ' | ' . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );
  ?>
</title>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
    <header id="masthead" class="site-header" role="banner">


  <!-- YOUR CUSTOM LINK HERE: -->
  <a href="http://lifestyle-site.com/">Switch to Lifestyle Site</a>    


        <hgroup>
            <h1 class="site-title">
        <a href="<?php echo home_url( "https://wordpress.stackexchange.com/" ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
      </h1>
            <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
        </hgroup>

        <nav role="navigation" class="site-navigation main-navigation">
            <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
        </nav>
    </header><!-- #masthead .site-header -->
<div id="main">

The part that adds the link is:

  <a href="http://lifestyle-site.com/">Switch to Lifestyle Site</a>

You can also wrap it in a div tag for more css control:

  <div id="custom-link">
  <a href="http://lifestyle-site.com/">Switch to Lifestyle Site</a>
  </div>

error code: 523