• Resolved jerocarson

    (@jerocarson)


    Greeting to everyone.
    I was able to create a 3 column footer-sidebar on my theme, but it shows everywhere, i have tried to exclude it from all pages, but nothing seems to work.

    this is the code i used in the footer.php

    <div id="footer-sidebar" class="secondary">
       <div id="footer-sidebar1">
         <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
             <?php endif; ?>
    
       </div>
       <div id="footer-sidebar2">
         <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
            <?php endif; ?>
    
       </div>
      <div id="footer-sidebar3">
         <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(4) ) : ?>
             <?php endif; ?>
    
          </div>
    </div> <!-- Close footer-sidebar -->

    https://africangamer.com

    i will appreciate any help. another thing u need to know, i should provide, thanks alot

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried wrapping it in an if is_page() conditional?

    if (!is_page()) { ?>
    <div id="footer-sidebar" class="secondary">
       <div id="footer-sidebar1">
         <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
             <?php endif; ?>
    
       </div>
       <div id="footer-sidebar2">
         <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?>
            <?php endif; ?>
    
       </div>
      <div id="footer-sidebar3">
         <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(4) ) : ?>
             <?php endif; ?>
    
          </div>
    </div> <!-- Close footer-sidebar -->
    
    <?php }
    Thread Starter jerocarson

    (@jerocarson)

    it worked! thanks, but u forgot to add this to the starting code
    <?php if (!is_page()) { ?>

    Thanks very much, i really appreciate this help. . .

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to exclude footer-sidebar from pages’ is closed to new replies.