WordPress.org

Ready to get started?Download WordPress

Forums

Bootstrap Ultimate
[resolved] widget home page (4 posts)

  1. domcisme
    Member
    Posted 4 months ago #

    how do I hide the footer widgets from just the home page?

  2. eminozlem
    Member
    Theme Author

    Posted 4 months ago #

    You'd go to footer.php and wrap the footer widgets with a conditional:

    <?php  if( !is_front_page() || !is_home() ) { ?>
                          <div id="widget-footer" class="clearfix row">
                            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1') ) : ?>
                            <?php endif; ?>
                            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer2') ) : ?>
                            <?php endif; ?>
                            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer3') ) : ?>
                            <?php endif; ?>
                          </div>
                          <?php } ?>

    Of course make sure you use a child theme in order not to lose your changes with future updates.
    https://codex.wordpress.org/Child_Themes
    Marking as resolved let me know if you've further questions

  3. domcisme
    Member
    Posted 4 months ago #

    didn't quite work for me (maybe as I'm using a static page as my front page)

    <?php
    global $eo_options;
    // Move footer outside #wrap if sticky footer is enabled
    if( $eo_options["sticky_footer"] == "1" ) echo "</div></div>";
    ?>
    
                    <footer role="contentinfo" id="footer">
    
                        <div id="inner-footer" class="container">
                          <hr />
                          <?php  if( !is_front_page() || !is_home() ) { ?>
                          <div id="widget-footer" class="clearfix row">
                            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1') ) : ?>
                            <?php endif; ?>
                            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer2') ) : ?>
                            <?php endif; ?>
                            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer3') ) : ?>
                            <?php endif; ?>
                          </div>
                          <?php } ?>
    
                            <nav class="clearfix">
                                <?php bones_footer_links(); // Adjust using Menus in WordPress Admin ?>
                            </nav>
    
                            <p class="pull-right<?php if ($eo_options["foot_linkback"]) echo ' authl'?>" id="copyright_foot">
                            <?php  if ($eo_options["foot_copy_right"]) 	echo $eo_options["foot_copy_right"];
    						if ($eo_options["foot_linkback"]) {
    						?>
    
                            <a href="http://eodepo.com/bootstrap-ultimate" title="Bootstrap 3 theme for WordPress" target="_blank"> Bootstrap UL</a>
                            </p><?php } // foot_linkback?>
    
                            <p class="attribution">&copy;
    						<?php if ($eo_options["foot_copy_left"]) {
    							echo $eo_options["foot_copy_left"];
    						} else {
    						 bloginfo('name');
    						}
    						 ?>
                            </p>
    
                        </div> <!-- end #inner-footer -->
    
                    </footer> <!-- end footer -->
    
    			<?php if(  $eo_options["sticky_footer"] != "1" ) { ?>  </div> <!-- end #maincnot .container --><?php  } ?> 
    
                <!--[if lt IE 7 ]>
                    <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
                    <script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
                <![endif]-->
           <?php wp_footer(); // js scripts are inserted using this function ?>
    	</body>
    </html>

    I can at the moment go to page.php and just comment out the footer but then it's gone for all pages.

  4. eminozlem
    Member
    Theme Author

    Posted 4 months ago #

    it should work. But of course I cant know what's wrong.
    Alternatively like you said you can modify the page.php and again wrap the footer widgets with a conditional like ! is_page(42);

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.