私はabout pageの 'about us'パラグラフの下にあるブログ投稿を、テンプレート部分の下のコードを使って表示しようとしています。しかし、それは実際のページのタイトルと日付情報をページを編集した日付として返すだけです。Wordpressのページのセクションにブログを表示するには?
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article class="post">
<header>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="post-details">
<i class="fa fa-user"></i><?php the_author_posts_link(); ?>
<i class="fa fa-calendar"></i> <?php the_time('F jS, Y'); ?>
<i class="fa fa-folder-open-o"></i> <a href=""><?php the_category(', '); ?></a>
<i class="fa fa-comments"></i><a href=""><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></a>
</div><!-- post details -->
</header>
<div class="post-excerpt">
<p><?php the_excerpt(); ?> <a href="post.html">continue reading</a></p>
</div><!-- post-excerpt -->
<hr>
</article><!-- end article -->
<?php endwhile; else : ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
実際のブログ投稿をこのセクションにプルするにはどのようなコードが必要ですか?
ここでカスタムWP_Queryを使用して、2番目のループとして投稿をプルする必要があります... https://codex.wordpress.org/Class_Reference/WP_Query 3番目の例、複数のループを参照してください。 – Mohsin