0

A previous developer made some huge messes, most of which I have fixed over time. The last problem, though, has to do with properly getting a footer in there, which he deleted.

I believe if I can get some assistance here understanding where to reposition elements from the body back into header (which I'm almost sure is necessary) and then what to put a container or wrapper around in the body/main page templates (he set them all up exactly the same, so fixing one will allow me to then go fix all), I can then take care of the other problems of preset height for pages and absolute positioning for footer, when it should be relative, and so on.

So, my focused question is, where could I put a wrapper/container around code in the body, so I can then go do the other relevant changes that will make dynamic height of the pages, and allow me to put "get footer" back in my template.php files, to be relatively positioned?

My apologies if I'm not posting correctly. Another developer directed me here. First time here , and I'm not sure of the protocols, including how much info to post to get a Q answered, and how to post code. Many thanks for your help and patience.

This is the site: www.voltrek.com.

Here is the last few lines of the header.php and then the code for one of the templates, in this case the Home page, that are all done the same. Also, Simple Sidebar Navigation is used for page hierarchy.

Header (last few lines)

<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>

<div id="page">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Simple Top Nav') ) : ?> <!--YOUR OLD NAVIGATION --><?php endif; ?>

Homepage template

 `get_header(); ?>


 <div class="voltrek_homepage">
     <img class="voltrek_site_top_section" src="<?php echo (get_template_directory_uri() . '/images/voltrek_site_top_section.png');  ?>" alt="" />
     <a id="voltrek_site_logo" href="/"></a>
     <a id="voltrek_site_contact" href="<?php echo get_permalink(463); ?>">Contact us</a>

     <!-- <img class="voltrek_homepage_body_section" src="<?php echo (get_template_directory_uri() . '/images/voltrek_homepage_body_section.png');  ?>" alt="" /> -->
     <img class="voltrek_homepage_photo" src="<?php echo (get_template_directory_uri() . '/images/voltrek_homepage_photo.jpg');  ?>" alt="" />

     <div class="voltrek_homepage_body_section" style="clear:both;" >

       <div class="voltrek_homepage_content_area_1">        

         <?php include("voltrek_page_hierarchy.php"); ?> 

         <?php the_secondary_content(1)?>

       </div><!--/voltrek_homepage_content_area1-->

       <div class="voltrek_homepage_content_area_2">        

         <?php the_secondary_content(2)?>

       </div><!--/area2-->

       <div class="voltrek_homepage_content_area_3">        

         <?php the_secondary_content(3)?>

       </div><!--/area3-->

      <div class="clear"></div>

 </div><!--/body_section-->

     </div><!--/homepage-->

     </div><!--/page-->

 </body>
 </html`

1 Answer 1

1

I got your problem. You are facing problem how and where to write the code for footer.

Below are some guide line it may help or give you some basic idea.

  1. First of you have to create footer.php template, if not created.
  2. Your tag should be closed in footer.php
  3. What ever code or div, links, copyright images etc you want to put u can code here.

  4. Example code of footer.php

<div id="footer" role="contentinfo">
    <div id="colophon">

        <div id="site-info">
            <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
                <?php bloginfo( 'name' ); ?>
            </a>
        </div><!-- #site-info -->

        <div id="site-generator">
            <?php do_action( 'twentyten_credits' ); ?>
            <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
        </div><!-- #site-generator -->

    </div><!-- #colophon -->
</div><!-- #footer -->

* tag of your theme, or you will break many plugins, which * generally use this hook to reference JavaScript files. */

wp_footer();

?>

  1. Please see below code.

// Your footer code should be here.

your code or what ever your requirement

* tag of your theme, or you will break many plugins, which * generally use this hook to reference JavaScript files. */

wp_footer();

?>

Note: If Still you are facing the problem then check below links

  1. http://codex.wordpress.org/Theme_Development See Template File Checklist for details

  2. http://codex.wordpress.org/Stepping_Into_Templates

  3. codex.wordpress.org/Templates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.