How to add section above header for custom post types

You could take the code used for the custom post type and save it as a file (in this case I’ll call it top.php). Upload top.php to the root of your theme folder. Make sure you remove the call to the header and footer. It might look something like this:

<?php 
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('showposts=" . $limit . "&paged=' . $paged);
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $loop = new WP_Query( array (
      'post_type' => 'portfolio', 
      'posts_per_page' => 5 )
      ); 
  while ( 
  $loop->have_posts() ) : 
  $loop->the_post();
  $custom = get_post_custom($post->ID);
  ?>
<div class="section entry" id="entry<?php the_ID(); ?>">
  <div class="posttitle">
    <h2><?php the_title(); ?></h2>
  </div>
    <div class="portfolio-image">  
      <a href="https://wordpress.stackexchange.com/questions/39912/<?php the_permalink(); ?>" title="<?php the_title();?>">
        <?php the_post_thumbnail('thumbnail'); ?>
      </a>
    </div>
  <?php the_excerpt(); ?>
</div><!-- section entry -->
<?php endwhile; ?>

Once the file has been uploaded to your server inside the theme’s root folder, you can then place it inside the header.php file like so:

<?php get_template_part('top'); ?>

I hope that helps. Let me know if you have any questions.