• Hi all,

    I have a new project that I am working on in which I am attempting to learn to use WordPress as a CMS. The homepage for my project will contain post from two categories in separate columns the code for which I think I know now.

    My question relates to creating the archive pages that will contain the full history of all posts in each category and the page that displays a single post from each category.

    In all the examples I have read you use the loop to display the posts, but I do not understand how WordPress knows which archive and single page template to load when a post link for either category is clicked as the beginning of the loop always seems to start the same:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    I hope this question makes some sense as it’s harder to describe in writing.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Question about the loop?’ is closed to new replies.