<?php get_header(); ?>
<main class="ceo-margin-top-30">
<div class="ceo-container ceo-margin-large-top ceo-margin-large-bottom">
	<?php while ( have_posts() ) : the_post(); ?>
	<div class="ceo-margin-bottom" ceo-grid>
		<div class="ceo-width-1-1@s ceo-width-2-3@m ceo-width-2-3@l ceo-width-2-3@xl">
			<div class="site-box b-r-4 b-a ceo-background-default ceo-overflow-hidden">
				<div class="site-title b-b">
					<span class="ceo-display-inline-block"><?php the_title(); ?></span>
				</div>
				<div class="ceo-margin-top ceo-margin-small-bottom" ceo-grid>
					<div class="ceo-text-center ceo-width-1-1@s ceo-width-auto@m ceo-width-auto@l ceo-width-auto@xl">
						<div class="site-box-cover b-r-4 ceo-inline ceo-overflow-hidden">
							<img src="<?php echo post_thumbnail_src(); ?>" style="filter: blur(5px);">
							<div class="ceo-overlay-primary ceo-position-cover ceo-flex ceo-flex-middle ceo-flex-center ceo-overflow-hidden ">
								<div class="site-box-cover-small b-r-4 ceo-display-inline-block ceo-background-default ceo-overflow-hidden"><img src="<?php echo post_thumbnail_src(); ?>"></div>
							</div>
						</div>
					</div>
					<div class="site-content b-r-4 ceo-overflow-hidden ceo-width-1-1@s ceo-width-expand@m ceo-width-expand@l ceo-width-expand@xl">
						<ul class="ceo-background-muted ceo-height-1-1 ceo-overflow-hidden">
							<li><span>名称：</span><?php the_title(); ?></li>
							<li><span>类型：</span><span><?php echo custom_taxonomies_terms_links(); ?></span></li>
							<li><span>简介：</span><?php the_content(); ?></li>
							<li><span>访问：</span><a href="<?php echo get_post_meta( get_the_ID(), '_site_director', true ); ?>" target="_blank" rel="nofollow" class="btn change-color b-r-4"><i class="iconfont icon-resonserate"></i></a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="ceo-width-1-1@s ceo-width-1-3@m ceo-width-1-3@l ceo-width-1-3@xl">
			<div class="site-box b-r-4 b-a ceo-background-default ceo-overflow-hidden">
				<div class="site-title b-b">
					<span class="ceo-display-inline-block">相关站点</span>
				</div>
				<div class="site-side ceo-grid-medium ceo-margin-top ceo-margin-small-bottom" ceo-grid>
					<?php 
					$posts = get_posts(
						array(							
							'numberposts' => '18', //输出的文章数量
							'post_type' => 'site',	//自定义文章类型名称		
							'tax_query'=>array(
								array(
									'taxonomy'=>'sitecat', //自定义分类法名称
									'terms'=>'sitecat'
								)
							),
						)
					);
					?>
					<?php if($posts): foreach($posts as $post): ?>	
					<div class="ceo-width-1-6">
						<a href="<?php the_permalink(); ?>" target="_blank" rel="nofollow" class="b-r-4 ceo-display-inline-block ceo-overflow-hidden" ceo-tooltip="<?php the_title(); ?>"><img src="<?php echo post_thumbnail_src(); ?>"></a>
					</div>
					<?php wp_reset_postdata(); endforeach; endif;?>
				</div>
			</div>

		</div>	
	</div>
	
	<?php endwhile; ?>
	
	<?php if(_ceo('comments_close') == false ): ?>	
	<?php if ( comments_open() || get_comments_number() ) : ?>
	<?php comments_template( '', true ); ?>
	<?php endif; ?>
	<?php endif; ?>
</div>
</main>
<?php get_footer(); ?>