<?php
 /* Template Name: References Template Page */
  ?>
 
<?php get_header(); ?>

  <!-- MAIN -->
<main class="main-blog start-block">

   <div class="container references_container">

    <div class="row">
      <?php echo do_shortcode(get_post_field('post_content', $yourpostid)); ?>

        <div id="references_main_div">
            
            <?php 
                $args = array( 'post_type' => 'references', 'posts_per_page' =>-1,'order' => 'ASC', );
                $the_query = new WP_Query( $args ); 
                $num = 1;
                if($the_query->have_posts()): while($the_query->have_posts()): $the_query->the_post();
                $categories = get_the_terms(get_the_ID(), 'news_taxonomy' ); 
                        ?>
                        <?php 
                 $catslug='';
                        foreach( $categories as $category ) {
                        $catslug .= $category->slug.' ';
                          }

                ?>

              <div class="references">
                <div class="references-wrapper">     
                    <img src="<?php echo get_the_post_thumbnail_url(); ?>" >
                    <div class="references_information">
                      <div class="references_title">
                        <p class="text-title"><?php the_title(); ?></p>
                      </div>
                    </div>
                </div>
            </div>   

            <?php $num++; endwhile; endif; ?>
          
           
        </div>
        </div>
    </div>    
    <!-- .site-main -->
 </main>
<!-- .content-area -->
<?php get_footer(); ?>