Search code examples
phpcsswordpresswordpress-themingdreamweaver

Disabling footer in Wordpress theme stops sticky navigation being sticky


I am using Dreamweaver to edit a child theme from WordPress. I want to change the footer or remove it completely. Currently, i have a copy of the footer.php file within my child theme and have commented out the code using /* */ to disable it for now and make it disappear from my site. Doing this has stopped the sticky navigation from working.

</div><!-- end main-container -->
</div><!-- end page-area -->
<?php /* if ( is_active_sidebar( 'envo-blog-footer-area' ) ) { ?>  				
	<div id="content-footer-section" class="container-fluid clearfix">
		<div class="container">
			<?php dynamic_sidebar( 'envo-blog-footer-area' ) ?>
		</div>	
	</div>		
<?php } ?>
<?php do_action( 'envo_blog_before_footer' ); ?> 
<footer id="colophon" class="footer-credits container-fluid">
	<div class="container">
		<?php do_action( 'envo_blog_generate_footer' ); ?> 
	</div>	
</footer>
<?php do_action( 'envo_blog_after_footer' ); ?> 
<?php wp_footer();  */ ?>

</body>
</html>

Can anyone tell me what is causing the sticky navigation to stop working and also what is the best way to edit the footer?

Thanks


Solution

  • you are blocking the scripts that are included in footer thats why your sticky navigation is not working when you comment your footer code

    Paste the below code in your footer an it will solve your problem

    </div><!-- end main-container -->
    </div><!-- end page-area -->
    <?php /* if ( is_active_sidebar( 'envo-blog-footer-area' ) ) { ?>               
        <div id="content-footer-section" class="container-fluid clearfix">
            <div class="container">
                <?php dynamic_sidebar( 'envo-blog-footer-area' ) ?>
            </div>  
        </div>      
    <?php } ?>
    <?php do_action( 'envo_blog_before_footer' ); ?> 
    <footer id="colophon" class="footer-credits container-fluid">
        <div class="container">
            <?php do_action( 'envo_blog_generate_footer' ); ?> 
        </div>  
    </footer>
    // <?php do_action( 'envo_blog_after_footer' );  */ ?> 
    <?php wp_footer();  ?>
    
    </body>
    </html>