title: WordPress footer above content
body: <p>Sorry, I'm a complete newbie at this, My question may sound stupid to some. 
  I've taken over maintenance of a WordPress site done by another developer who's no longer reachable. I'm having trouble with getting the content to display properly on the following page <a href="https://www.covalin.com/product-category/boxes/metallic-boxes/" rel="nofollow noreferrer">https://www.covalin.com/product-category/boxes/metallic-boxes/</a>, when I change the number of products to be shown on the page to anything higher than 9, then it pushes the footer to the middle of the page and shows products below the footer. I want to be able to all products under each subcategory. Please see the screenshots below in order to get an idea of the issue. Any guidance will be most appreaciated, I've spent hours trying to figure this out. </p>
  
  <p>When I use the following CSS below, it partly solves the problem but creates another one where all of the content is scrollable but appears behind the footer.</p>
  
  <p>CSS Code - used</p>
  
  <pre><code>.footer {
   position: fixed;
   bottom:0;
   }
  </code></pre>
  
  <p>PHP Code which changes the number of products display, added by last dev:</p>
  
  <pre><code>/*---------- woo-product pagination number setting ------------*/
  
  add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 );
  
  function new_loop_shop_per_page( $cols ) {
  // $cols contains the current number of products per page based on the value 
  stored on Options -&gt; Reading
  // Return the number of products you wanna show per page.
  $cols = 27; //I changed this from 27 to 9 for the page to display properly.
  return $cols;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HtI5Y.png" rel="nofollow noreferrer">How the site looks like with 9 products on a page</a></p>
  
  <p><a href="https://i.stack.imgur.com/l4Mwj.png" rel="nofollow noreferrer">How the site looks like with 27 products on a page</a></p>
  
  <p><strong>Updated - with footer.php file below</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  /**
   * The template for displaying the footer
   *
   * Contains footer content and the closing of the #main and #page div elements.
   *
   * @package WordPress
   * @subpackage Twenty_Fourteen
   * @since Twenty Fourteen 1.0
   */
  ?&gt;
  
  &lt;?php // Check if site turned to boxed version
     $boxed = ''; $boxed_element = ''; $row_class = '';
     if (get_option('site_layout')=='boxed') {$boxed = 'container'; $boxed_element = 'col-md-12 col-sm-12'; $row_class = 'row';}
  ?&gt;
  
    &lt;?php if ($boxed &amp;&amp; $boxed!='') { ?&gt;
     &lt;/div&gt;
     &lt;div class='row'&gt;
    &lt;?php } ?&gt;
  
  
  &lt;?php if ( class_exists('Woocommerce') ): ?&gt;
   &lt;?php  if(is_shop() || is_product() &amp;&amp; is_active_sidebar('footer-bottom-shop')): ?&gt;
       
   &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;div class="container"&gt;
            &lt;div class="row"&gt;&lt;?php endif; ?&gt;
             &lt;div class="shop-bottom-sidebar col-xs-12 col-sm-12 col-md-12"&gt;
              &lt;?php dynamic_sidebar('footer-bottom-shop'); ?&gt;
             &lt;/div&gt;
   &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;/div&gt;
           &lt;/div&gt;&lt;?php endif; ?&gt;
   &lt;?php endif ?&gt;
  &lt;?php endif ?&gt;
    
    &lt;footer id="colophon" class="site-footer &lt;?php echo esc_attr($boxed_element);?&gt;"&gt;
  
     &lt;?php 
      if (get_option('site_footer_top_background_option') &amp;&amp; get_option('site_footer_top_background_option')!=''){
       $site_footer_top_background_option = get_option('site_footer_top_background_option');
      }
      else{$site_footer_top_background_option='';}
     ?&gt;
    
    &lt;?php if(is_active_sidebar('footer-top-sidebar-1') || is_active_sidebar('footer-top-sidebar-2')): ?&gt;
     &lt;div class="footer-top widget-area &lt;?php echo esc_attr($row_class);?&gt;" style="background:&lt;?php echo esc_attr($site_footer_top_background_option); ?&gt;;"&gt; 
      &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;div class="container"&gt;
      &lt;div class="row"&gt;&lt;?php endif; ?&gt;
  
      &lt;div class="col-xs-12 col-sm-6 col-md-6 footertopsidebarone"&gt;
       &lt;?php if(is_active_sidebar('footer-top-sidebar-1')): ?&gt;
        &lt;?php dynamic_sidebar('footer-top-sidebar-1'); ?&gt;
       &lt;?php endif;?&gt;
      &lt;/div&gt;
  
      &lt;div class="col-xs-12 col-sm-6 col-md-6 footertopsidebartwo"&gt;
       &lt;?php if(is_active_sidebar('footer-top-sidebar-2')): ?&gt;
        &lt;?php dynamic_sidebar('footer-top-sidebar-2'); ?&gt;
       &lt;?php endif;?&gt;
      &lt;/div&gt;
      
      &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;/div&gt;&lt;/div&gt;&lt;?php endif; ?&gt;
     &lt;/div&gt;
    &lt;?php endif; ?&gt;
  
    &lt;?php 
      if (get_option('site_middle_background_option') &amp;&amp; get_option('site_middle_background_option')!=''){
       $site_middle_background_option = get_option('site_middle_background_option');
      }
      else{$site_middle_background_option='';}
    ?&gt;
     &lt;div class="footer-middle widget-area &lt;?php echo esc_attr($row_class);?&gt;" style="background:&lt;?php echo esc_attr($site_middle_background_option);?&gt;"&gt;
      &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;div class="container"&gt;
       &lt;div class="row"&gt;&lt;?php endif; ?&gt;
       &lt;?php
        if (get_option('footer_bg_img') &amp;&amp; get_option('footer_bg_img')!=''){
        $footer_bg_img_url = get_option('footer_bg_img');
       }
       else{$footer_bg_img_url='';}
       
       if (get_option('footer_bg_img_position') &amp;&amp; get_option('footer_bg_img_position')!=''){
        $footer_bg_img_position = get_option('footer_bg_img_position');
        switch($footer_bg_img_position){
         case "right":
          $storex_footer_bg_position='96%';
          break;
         case "left":
          $storex_footer_bg_position='4%';
          break;
        }
       }
       else{$storex_footer_bg_position='';}
       
       ?&gt;
        &lt;div class="fotter-bg-img" style="background: url(&lt;?php  echo esc_url($footer_bg_img_url)?&gt;)  no-repeat transparent; background-position:&lt;?php echo esc_attr($storex_footer_bg_position)?&gt; 90%"&gt;
       
         &lt;div class="col-xs-12 col-sm-6 col-md-3"&gt;
          &lt;?php if ( is_active_sidebar( 'footer-sidebar-1' ) ) : ?&gt;
           &lt;?php dynamic_sidebar( 'footer-sidebar-1' ); ?&gt;
          &lt;?php endif; ?&gt;
         &lt;/div&gt;
         &lt;div class="col-xs-12 col-sm-6 col-md-3"&gt;
          &lt;?php if ( is_active_sidebar( 'footer-sidebar-2' ) ) : ?&gt;
          &lt;?php dynamic_sidebar( 'footer-sidebar-2' ); ?&gt;
          &lt;?php endif; ?&gt;
         &lt;/div&gt;
         &lt;div class="col-xs-12 col-sm-6 col-md-3"&gt;
          &lt;?php if ( is_active_sidebar( 'footer-sidebar-3' ) ) : ?&gt;
           &lt;?php dynamic_sidebar( 'footer-sidebar-3' ); ?&gt;
           &lt;?php endif; ?&gt;
         &lt;/div&gt;
         &lt;div class="col-xs-12 col-sm-6 col-md-3"&gt;
          &lt;?php if ( is_active_sidebar( 'footer-sidebar-4' ) ) : ?&gt;
           &lt;?php dynamic_sidebar( 'footer-sidebar-4' ); ?&gt;
          &lt;?php endif; ?&gt;
         &lt;/div&gt;
        &lt;/div&gt;
        
       &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;/div&gt;
      &lt;/div&gt;&lt;?php endif; ?&gt;
     &lt;/div&gt;
  
     &lt;?php 
      if (get_option('site_footer_bottom_background_option') &amp;&amp; get_option('site_footer_bottom_background_option')!=''){
       $site_bottom_background_option = get_option('site_footer_bottom_background_option');
      }
      else{$site_bottom_background_option='';}
      
     ?&gt;
     
     &lt;div id="footer-bottom" style="background:&lt;?php echo esc_attr($site_bottom_background_option); ?&gt;;" class="&lt;?php echo esc_attr($row_class);?&gt; footer-bottom"&gt;
      &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;div class="container"&gt;
       &lt;div class="row"&gt;&lt;?php endif; ?&gt;
        &lt;div class="col-xs-12 col-sm-6 col-md-6"&gt;
         &lt;?php if (has_nav_menu('footer-nav')) : ?&gt;&lt;!-- Footer navigation --&gt;
          &lt;nav id="site-navigation-footer" class="footer-navigation"&gt;
           &lt;?php wp_nav_menu( array('theme_location'  =&gt; 'footer-nav') ); ?&gt;       
          &lt;/nav&gt;
        &lt;?php endif; ?&gt;&lt;!-- Footer navigation --&gt;
  
        &lt;div class="site-info"&gt;
         &lt;?php $copyright = esc_attr(get_option('site_copyright'));
         if ($copyright != '') {
          echo esc_attr($copyright);
         } else {
          echo 'Storex &amp;copy; '.date('Y') .''.esc_html__(' Theme by Themes Zone. All rights reserved', 'storex');
         }
         ?&gt;
        &lt;/div&gt;
  
        &lt;/div&gt;
  
        &lt;div class="col-xs-12 col-sm-6 col-md-6"&gt;
         &lt;?php if ( is_active_sidebar( 'footer-bottom' ) ) : ?&gt;
                               &lt;?php dynamic_sidebar( 'footer-bottom' ); ?&gt;
                           &lt;?php endif; ?&gt;
        &lt;/div&gt;
  
       &lt;?php if (!$boxed || $boxed=='') : ?&gt;&lt;/div&gt;
      &lt;/div&gt;&lt;?php endif; ?&gt;
     &lt;/div&gt;
     
    &lt;/footer&gt;&lt;!-- #colophon --&gt;
    &lt;?php if ($boxed &amp;&amp; $boxed!='') { ?&gt;
     &lt;/div&gt;
    &lt;?php } ?&gt;
  &lt;/div&gt;&lt;!-- #page --&gt;
  
  &lt;script&gt;
   jQuery( document ).ready(function() {
    
    jQuery('.quantity').append("&lt;span class='qty-cus'&gt;Qty&lt;/span&gt;");
    
    jQuery('.wc-forward').val('View Order');
  jQuery('.update_cart').val('Update Order');
    
    });
  
    //review order table text changes
    jQuery(window).on('load',function(){
      setTimeout(function() {   //calls click event after a certain time
       jQuery('.cart-subtotal th').text('Order SubTotal'); 
     }, 3000);
      jQuery('.update_cart').val('Update Order');
  
      jQuery('.page-template-special-offer .header-stripe h1.title').text('SPECIAL OFFERS');
  
      jQuery('.product-description-wrapper &gt; .quantity').remove();
    });
  
    var cloned_field = jQuery('.register p.form-row.full').clone();
    jQuery('#custom_fax_no').append(cloned_field);
    jQuery('.register p.form-row.full').eq(0).remove();
  
  
    
    jQuery(window).scroll(function(){
           var winScroll= jQuery(window).scrollTop();
     console.log(winScroll);
  
           if(winScroll&gt;0){
            jQuery('.header-top').addClass('sticky');
           }else{
            jQuery('.header-top').removeClass('sticky');
           }
    });
  
  &lt;/script&gt;
  
    &lt;?php wp_footer(); ?&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>