Welcome! To use this support forum, please Login or Join Today!

   

Too much space on pages?

{name}
RankRank

Total Posts: 45

Joined 2013-06-24

PM

 

Hey All,

I’m trying to figure out how to make the pages more dynamic for this site.  Some of my pages just have a TON of space.  Example:

http://sts.test-lca-website.com/about-us/

How best to deal with this?

Thanks in advance.

{name}
RankRank

Total Posts: 45

Joined 2013-06-24

PM

 

I cheated and forced a 0 height in a custom CSS

#sticky-footer-push {
        
height0px !important;
{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

You basically are wanting to disable the “sticky footer” and that’s certainly one way to do it.

A more efficient method would be to remove custom.js from the parent theme, then re-add it to the child theme, and remove the sticky footer function from the JS.

Remove custom.js from parent theme:

function remove_scripts() {
 wp_deregister_script('custom',get_bloginfo('template_url') ."/javascripts/custom.js",array('jquery'),'1.2.3',false);
}
add_action('wp_enqueue_scripts', 'remove_scripts',99);

Add custom.js to the child theme:

function add_scripts() {
 wp_register_script('custom',get_stylesheet_directory_uri() ."/javascripts/custom.js",array('jquery'),'1.2.3',false);
}
add_action('wp_enqueue_scripts', 'add_scripts',99);

Copy custom.js from /element/javascripts/custom.js to element-child/javascripts/custom.js then remove the sticky footer function:

 // jquery sticky footer

 $(function(){ // run after page loads
  positionFooter();

   $(window)
     .scroll(positionFooter)
     .resize(positionFooter);

   function positionFooter() {
     var docHeight = $(document.body).height() - $("#sticky-footer-push").height();
     if(docHeight < $(window).height()){
       var diff = $(window).height() - docHeight;
       if (!$("#sticky-footer-push").length > 0) {
         $("#footer").before('<div id="sticky-footer-push"></div>');
       }
       $("#sticky-footer-push").height(diff);
     }
   }
 });