1
죄송합니다. 저는 처음부터 WordPress 코딩 및 학습에 익숙합니다. 저의 경험 부족을 용서해주십시오.Date Base Archive on WordPress Homepage
'제품'이라는 사용자 정의 게시 유형이 있고이를 홈페이지에 날짜 기반 보관 파일로만 표시하려고합니다. 그러나, 나는 그 날짜에 처음 3 개 또는 4 개의 게시물의 특집을 제외한 게시물의 제목이나 다른 내용을 표시하고 싶지 않습니다. 이런 식으로 뭔가 :
나는 다음과 같은 코드를 시도하고 있지만 일반 루프와 게시물을 반환합니다.
<?php $query = new WP_Query(array('post_type' => 'products', 'orderby' => 'date')); ?>
<?php if ($query->have_posts()) : ?>
<?php /* Start the Loop */ ?>
<?php while ($query->have_posts()) : $query->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
$archive_year = get_the_time('Y');
$archive_month = get_the_time('m');
$archive_day = get_the_time('d');
?>
<div class="idpostdate">
<a href="<?php echo get_day_link($archive_year, $archive_month, $archive_day); ?>"><?php the_date('F j, Y', '', '<span class="datetext">: Click Here To View Products</span>', true);?></a>
</div>
<div class="thumbnail">
<?php if (has_post_thumbnail()) { the_post_thumbnail('homet'); } ?>
</article>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part('no-results', 'index'); ?>
<?php endif; ?>
어떤 지침이 있습니까?