在The Loop中,我放置导航编码的位置是否重要?

I am currently building my own WordPress Theme, with the view of 'learning on the job' as I am fairly new to writing my own PHP Coding.

I want to place a 'Previous' and 'Next' set of links to appear at the bottom of my Blog Page. I have referred to the WordPress Codex, which states to place the following code after The Loop:

<div class="navigation">
 <div class="alignleft"><?php previous_posts_link('&laquo; Read Previous Blogs') ?></div>
 <div class="alignright"><?php next_posts_link('Read More Blogs &raquo;','') ?></div>
 </div>

By 'after The Loop', does this mean after the 'endwhile' statement but before the 'endif;' or after them both all together? I have placed the above code in both scenarios but it does not seem to make a difference. Just wondering if there is a best practice etc. I have included The Loop coding I am using, for reference, in case my coding affects any answers. Please ignore the numbers such as [1], [2] and [3] etc. I have placed these as comments for my own use, where I have created my own list of notes on a separate file. As a side question, commenting my coding like this won't affect performance etc?:

<?php   
   /*
    =========================================
    Generating the Posts.  The Loop.  (Start)
    =========================================
  */

if ( have_posts() ):                        //[1]
        while( have_posts() ): the_post();      //[2] and [3] 
?>
        <h3><a href="<?php the_permalink(); //[4]?>"><?php the_title(); //[5]?></a></h3> 
        <p><?php the_content(); // [6]?></p> 
        <small>This entry was posted on: <?php the_date('l, jS F Y'); //[7]?> at <?php the_time('g:i a'); //[7]?> and is filed under <?php the_category(); //[7]?></small>
        <small>This Article was written by: <?php the_author_link(); //[7]?></small>
        <div class="post"><?php edit_post_link('Edit','','<strong>|</strong>'); //[8]?>  
        <?php comments_popup_link('Be the first to comment »', 'Just the one comment so far »', '% Comments »', '', 'Comments are Closed for this article.'); //[8]?></div>

<?php 
        endwhile; //[9]
        endif;    //[10]
/*
    =======================================
    Generating the Posts.  The Loop.  (End)
    =======================================
*/
?>
 <div class="navigation">
 <div class="alignleft"><?php previous_posts_link('&laquo; Read Previous Blogs') ?></div>
 <div class="alignright"><?php next_posts_link('Read More Blogs &raquo;','') ?></div>
 </div>

Nope You Can place theme anywhere between endwhile; and endif loop . never put after endif; view below snippet :

<?php

if ( have_posts() ):    //Checks if posts available 

    while( have_posts() ): the_post();  //loop starts
    ?>
    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> 
    <p><?php the_content(); ?></p> 
    <small>This entry was posted on: <?php the_date('l, jS F Y'); ?> at <?php the_time('g:i a'); ?> and is filed under <?php the_category(); ?></small>
    <small>This Article was written by: <?php the_author_link(); ?></small>
    <div class="post"><?php edit_post_link('Edit','','<strong>|</strong>'); //[8]?>  
        <?php comments_popup_link('Be the first to comment »', 'Just the one comment so far »', '% Comments »', '', 'Comments are Closed for this article.');?></div>

        <?php 
            endwhile; //loop end
        ?>
    <div class="navigation">
       <div class="alignleft"><?php previous_posts_link('&laquo; Read Previous Blog Posts') ?></div>
       <div class="alignright"><?php next_posts_link('Read More Blog Posts &raquo;','') ?></div>
   </div> <?php endif;  ?>

After the while (or you will have them under each post) and before the if (so you won't have them if there are no posts returned).