<main id="main" class="site-main" role="main"> 
<div id="primary" class="content-area">
<article id="comments-page" class="comments-page page type-page status-publish hentry entry">    
  <header class="entry-header alignwide">
    <?php
    the_archive_title( '<h1 class="page-title">', '</h1>' );
    the_archive_description( '<div class="taxonomy-description">', '</div>' );
    ?>
  </header><!-- .page-header -->
  
  <?php
  if ( have_posts() ) : ?>
    
    <div class="entry-content">
      <?php /* Start the Loop */ ?>
      <div class="mosaic-container entry-content post">
        
      </div><!-- #mosaic-container -->
    </div>
  <?php else :
  
  get_template_part( 'template-parts/content', 'none' );
  
  endif; ?>
</article>
    <header class="entry-header alignwide">
      <?php
      the_archive_title( '<h1 class="page-title">', '</h1>' );
      the_archive_description( '<div class="taxonomy-description">', '</div>' );
      ?>
    </header><!-- .page-header -->






<?php while ( have_posts() ) : ?>
              
	      <?php
              /* get_template_part( 'template-parts/content', get_post_format() ); */
              $post = get_post(the_post());
              $image = false;
              if ( get_attached_media('image', $post->ID) ) {
                  $image = array_shift(get_attached_media('image', $post->ID));
                  $image = $image->ID;
              }
              if (! $image) {
                  $image = get_post_thumbnail_id($post->ID);
                  echo "<!-- get_the_post_thumbnail " . $image . " -->\n";
              }
              if ( $image ) {
                  /* $thumbsrc = wp_get_attachment_image_src($image->ID, 'optics-mws-gallery-thumb')[0]; */
                  $thumbsrc = wp_get_attachment_image_src($image, 'thumbnail')[0];
                  $fullsrc =  wp_get_attachment_image_src($image,'full')[0];
                  $style = "";
              } else {
                  $thumbsrc = get_stylesheet_uri() . '/../270.png';
                  $tithumbsrc = get_stylesheet_uri() . '/../560.png';
                  $style = "style='display: inline-block !important; background: #ddd;'";
              }
              echo "<div class='box box2'><a href='$fullsrc'><img src='$thumbsrc' /></a>\n";
              echo "<div class='imagetitlebar' $style><a href='", get_permalink($post->ID),
              "'><span><b>", get_the_title($post->ID), "</b><br />(",
              get_the_date('', $post->ID), ")</span></a></div>";   
              echo '</div><!-- end box -->';
              ?>
	    <?php endwhile; ?>
