Ok, I am going insane within the_permalink() function. Once again to become simple to explain the problem, however i will attempt. When I am around the index page of this site(index.php), so when I click a hyperlink that's within the footer section, it will require me towards the recent publish (single.php), which is okay. However, after i begin around the index page(index.php), so when I personally use the navigation bar to navigate to some certain page(page.php)(that has exactly the same layout because the index.php), after which, after i click on the same link that's within the footer section it will take me towards the recent publish (single.php), but it's not. It's taking me to the present page(page.php) rather than single.php. This is a snippet of my code:

The footer:

   <div id="clear"></div>

        <div id="video">
            <!--<a href="http://www.youtube.com/watch?v=WYc4ZOxRX-4" target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/video_03.png" alt="Video" border="0" width="263" height="193" title="Video" /></a>-->
            <iframe width="263" height="208" src="http://www.youtube.com/embed/WYc4ZOxRX-4?rel=0" frameborder="0" allowfullscreen></iframe>
        </div><!-- end of video -->

        <div id="weeklyadbox">
            <p id="content"><a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/weeklyad.jpg" height="147" width="178" alt="Weekly Specials" border="0" title="Click to See Our Weekly Specials" /></a></p>
        </div><!-- end of weeklyadbox -->

        <div id="weathericon">
            <a href="<?php bloginfo("url"); ?>"><img src="<?php bloginfo('template_url'); ?>/images/icons_03.png" border="0" alt="Weather Icon" title="See Weather" height="96" width="83" /></a>

        <div id="directionsicon">
            <a href="<?php bloginfo("url"); ?>"><img src="<?php bloginfo('template_url'); ?>/images/icons_04.png" border="0" alt="Directions Icon" title="Get Directions" height="94" width="96" /></a>

        <div id="webcamicon">
            <a href="<?php bloginfo("url"); ?>"><img src="<?php bloginfo('template_url'); ?>/images/icons_05.png" border="0" alt="Web Cam Icon" title="Web Cam" height="96" width="84" /></a>

        </div><!-- end of container --> 

        <div id="footer">
        &copy;<?php echo date("Y"); echo " "; bloginfo('name'); ?>


<?php wp_footer(); ?>

The_permalink() is okay when I am within the index section, although not when I am on the different page. I attempted using echo get_permalink(53), also it labored, but what goes on whenever a client gets into the dashboard and produces a brand new publish? The brand new publish may have another publish ID, which link won't point to the brand new publish, and can point to that old publish which has an ID equals to 53.

If you want to see other code, please tell me!

Any advice? Appreciate your help!

I am speculating you misinterpreted the functionality from the "the_permalink" function. It should be used within the loop, and you'll have the url to the present publish that's being processed inside the loop. If you wish to possess a link which will always indicate you page, you could utilize something similar to:

        if(get_option('show_on_front') == 'page')
            echo get_permalink(get_option('page_for_posts'));
            echo bloginfo('url');

It appears as if you are utilizing the_permalink() outdoors the Wordpress loop. get_permalink() works outdoors "the loop" since you are clearly passing the "Publish ID" towards the function.

Look at this page explaining "the loop" http://codex.wordpress.org/The_Loop

From searching in the snippet you published that seems to become the issue.
I published some sample "loop" code below:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> 
<?php /** YOUR CODE HERE **/ ?>
<?php endwhile; else: ?> 
_e('Sorry, no posts matched your criteria.'); ?></p> 
<?php endif; ?>