<?php
/**
 * Pengumuman Beranda
 */
?> 

    <div class="outer_fasblock clear">
	    <div class="home_fasilitas">

        <?php // query
		    $args = array(
			    'post_type' => 'fasilitas', 
			    'posts_per_page' => 4, 
				'orderby' => 'rand',
			);
		    query_posts($args);
			?>
			<div class="bot_head"><span class="re_fasilitas"><?php press_re_fasilitas(); ?></span></div>
				<?php 
				    if (have_posts()) {
						while (have_posts()): the_post();
						    global $post;
						    ?>
							
							<div class="box_fas">
							    <a href="<?php the_permalink() ?>">
							    	<?php // Featured Image
						                if (has_post_thumbnail()) { 
						                	echo '<div class="fas_image">';
											the_post_thumbnail('news'); 
											echo '</div>';	
						                } else {
											if ( get_theme_mod('pressthumb_image') != "" ) {
							                	echo '<div class="fas_image"><img src="'. get_theme_mod('pressthumb_image') .'" /></div>';	
											} else {
												echo '<div class="fas_image"><img src="'. get_theme_file_uri('images/prestasi.jpg') .'" /></div>';
											}
						            	}
									?>
								</a>
							</div>
							
							<?php 
						endwhile;
					} 
				?>
		<?php wp_reset_query(); ?>
        </div>
    </div>