Wordpress - use multiple footers

Hi - Currently I have a footer that contains a BBB logo. That logo should only be on one page. I also need to insert another BBB logo, with different code, into another page. There are about 12 other pages that need no BBB logo at all so I need to remove that.

I'm wondering what the best approach is if this is possible.

Here's a link to one of the site pages: page link
Trevor LocalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
0
Trevor LocalAuthor Commented:
Yeah - the site is a mess and will be redone in a few months. Until then we're limping along...
0
Jason C. LevineNo oneCommented:
I'm wondering what the best approach is if this is possible.

Usually the best approach is to use one of the WordPress conditionals in footer.php to determine what page is being displayed and showing/hiding whatever content.  If you only want the BBB on the home page, is_home() is the conditional to use.

But those blocks look like they are widget containers.  Are they?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Trevor LocalAuthor Commented:
But those blocks look like they are widget containers.  Are they?

Not sure which blocks you're referring to.

I'm thinking maybe I'll remove the BBB logo from the footer, and then add the two somewhere else, like on the contact page.
0
Jason C. LevineNo oneCommented:
From the link above, there is a true "footer" area that holds just the copyright statement.

Above that are 4 content blocks in a with the BBB logo in the fourth one (rightmost).  What I can't tell from the HTML and CSS designations is if those four content blocks are actually a footer (and thus editing footer.php is the answer) or if they are widgets or some other form of preset text (e.g. A theme control panel option?).

Tl;dr Where is the logo HTML being set?  Which theme is this?
0
Trevor LocalAuthor Commented:
Yes, all those blocks are inside the footer.php.

It's a custom theme.

Where is the logo HTML being set?
Not sure what you mean.
0
Jason C. LevineNo oneCommented:
Not sure what you mean.

Where, in the theme files, is the HTML that calls the BBB logo?  What does that code block look like?

Yes, all those blocks are inside the footer.php.

So you should be able to open footer.php, find the code that calls the BBB logo and wrap it with is_home().  That will change the footer behavior to only show the BBB logo on the home page of the site and all other pages will hide it.
0
Trevor LocalAuthor Commented:
I think I understand the concept. Here is the footer code:

<div id="block_area2">



<div class="blockitem2">



<h3>Ducerus</h3>



<ul>



<?php 



$subMenu1 = array(



'container' => false, 



'theme_location'  => 'sub_menu1',



'menu_class'      => 'subNav',



'items_wrap' => __('%3$s')



);							



wp_nav_menu( $subMenu1 ); 



?>



</ul>



</div><!--ends first block item-->



<!--third block item-->



<div class="blockitem2" style="margin-left: 32px;">



<h3>Resources</h3>



<ul>



<?php 



$subMenu2 = array(



'container' => false, 



'theme_location'  => 'sub_menu2',



'menu_class'      => 'subNav',



'items_wrap' => __('%3$s')



);							



wp_nav_menu( $subMenu2 ); 



?>



</ul>



</div><!--ends third block item-->



<!--fourth block item-->



<div class="blockitem2" style="display: table;



    margin-left: 112px;



    width: auto;">



<h3>Follow Us!</h3>



<ul style="display:block;width:70px;">



<?php 



$subMenu3 = array(



'container' => false, 



'theme_location'  => 'sub_menu3',



'menu_class'      => 'subNav',



'items_wrap' => __('%3$s')



);							



//wp_nav_menu( $subMenu3 ); 



/*if(is_user_logged_in())



{



?>



<li><a href="<?php echo wp_logout_url(); ?>" title="Login">Logout</a></li>



<?php } else { ?>



<li><a href="<?php echo wp_login_url(); ?>" title="Login">Advisor Login</a></li>	



<?php } */ ?>



    <li><a href="https://www.facebook.com/ducerus"><img width="32" height="32" src="http://www.ducerus.com/images/socialmedia/submenu/facebook.png"></a> <a href="http://pinterest.com/ducerus/"><img width="32" height="32" src="http://www.ducerus.com/images/socialmedia/submenu/pintrest.png"></a></li>



    <li><a href="http://www.youtube.com/ducerus"><img width="32" height="32" src="http://www.ducerus.com/images/socialmedia/submenu/youtube.png"></a> <a href="https://plus.google.com/108480413841984554987/about?hl=en-US"><img width="32" height="32" src="http://www.ducerus.com/images/socialmedia/submenu/google-plus.png"></a></li>                



    <li><a href="https://twitter.com/ducerushq"><img width="32" height="32" src="http://www.ducerus.com/images/socialmedia/submenu/twitter.png"></a> <a href="http://www.linkedin.com/company/ducerus"><img width="32" height="32" src="http://www.ducerus.com/images/socialmedia/submenu/linkedin.png"></a></li>



</ul>



</div><!--ends fourth block item-->



<!--fifth block item-->



<div class="blockitem2" style="display: table;



    margin-left: 168px;



    width: auto;">



<h3>Login</h3>



<ul>



<?php 



$subMenu4 = array(



'container' => false, 



'theme_location'  => 'sub_menu4',



'menu_class'      => 'subNav',



'items_wrap' => __('%3$s')



);							



wp_nav_menu( $subMenu4 ); 



if(is_user_logged_in())



{



?>



<li><a href="<?php echo wp_logout_url(); ?>" title="Logout">Branch Logout</a></li>



<?php } else { ?>



<li><a href="<?php echo wp_login_url(); ?>" title="Login">Branch Login</a></li>	



<?php } 



/*



<!--fifth block item-->



<div class="blockitem3">



<h3>Follow Us and register for our newsletter</h3>



<ul class="social-links">



<li><a href="http://www.facebook.com/pages/Ducerus/174912385890067" target="blank;"><img src="<?php echo IMG; ?>/socialmedia/facebook.png" alt="" /></a></li>



<li><a href="http://twitter.com/ducerus" target="blank;"><img src="<?php echo IMG; ?>/socialmedia/twitter.png" alt="" /></a></li>



<li><a href="#" target="blank;"><img src="<?php echo IMG; ?>/socialmedia/linkedin.png" alt="" /></a></li>



<li><a href="#" target="blank;"><img src="<?php echo IMG; ?>/socialmedia/rss.png" alt="" /></a></li>                            



</ul>



</div><!--ends fifth block item--> 



*/ ?>



</ul>

<p>&nbsp;</p>

<a title="Ducerus BBB Business Review" href="http://www.bbb.org/san-diego/business-reviews/schools-academic-college-preparatory/ducerus-in-carlsbad-ca-172004905/#bbbonlineclick"><img alt="Ducerus BBB Business Review" style="border: 0;" src="http://seal-sandiego.bbb.org/seals/blue-seal-96-50-ducerus-172004905.png" /></a>

</div><!--ends fourth block item-->  



</div><!--ends second block area-->



<!--This sections contains the website authenticity and security seals-->



<div id="seals">



<!--seal 3 item-->



<div class="seal"><a href="#" id="seal3" target="_blank"></a></div>



<!--seal 1 item-->



<div class="seal"><a href="http://godaddy.com" id="seal1" target="_blank"></a></div>



<!--seal 4 item-->



<div class="seal"><span style=" display:block; font-size:16px; width:584px;">Featured in:</span></div>   



</div><!--ends seals-->



<div id="footerwrapper">



<div id="disclaimers"><a href="<?php echo get_permalink(get_option(PREFIX.'footer_policy')); ?>">Privacy Policy</a> | <a href="<?php echo get_permalink(get_option(PREFIX.'footer_disclaimer')); ?>">Disclaimer</a> </div><!--ends disclaimer-->



<div class="copyright"><?php echo get_option(PREFIX.'footer_copyright'); ?></div><!--ends copyright-->



</div><!--ends footerwrapper-->



</div><!--ends div id container-->



<?php global $user_login; get_currentuserinfo(); ?>



<script type="text/javascript">



var $theRegLink = '<?php echo get_permalink(get_option(PREFIX.'is_reg_page')); ?>';



var $theSiteURL = '<?php echo SITEURL; ?>';



var $theCatClass = '.cat<?php echo tsw_get_id_by_event_category($user_login); ?>';



var $locCatClass = '.cat<?php echo isset($_SESSION["TSWcatID"]) ? $_SESSION["TSWcatID"] : 29; ?>';



</script>



<?php wp_footer(); ?>



<?php if(is_user_logged_in()) { ?>



<script type="text/javascript">



jQuery.noConflict();



jQuery(document).ready(function(){



jQuery($theCatClass).trigger('click');	



});



</script>



<?php } else { ?>



<script type="text/javascript">



jQuery.noConflict();



jQuery(document).ready(function(){



jQuery($locCatClass).trigger('click');	



});



</script>



<?php } // print_r($_SESSION);?>



<script type="text/javascript" src="https://m430.infusionsoft.com/app/webTracking/getTrackingCode?trackingId=976b898d2d821841a7cc2b8abedc7c4c"></script>



</body>







</html>

Open in new window


But I think the problem will be that the "home" page in this case doesn't have the footer. This home page url  ducerus.com/franchisee - which contains all the different site locations pages (calendars, contact page) - redirects back to ducerus.com, which doesn't have that footer.

http://www.ducerus.com/locations.php shows all the locations, and the links go to the ducerus.com/franchisee pages. Carlsbad location should have the current logo, Ft. Worth will have new logo. No other location should have a BBB logo.

Is there a way to wrap the code specifically for the two pages that need the BBB logo?

thank you
0
Jason C. LevineNo oneCommented:
Is there a way to wrap the code specifically for the two pages that need the BBB logo?

Yes.  Concept is the same, execution differs slightly.  Instead of performing a check for is_home(), you switch to is_page() and add a parameter that checks for specific ID, page title, or slug (ID preferred) and do something based on results.

So:
if ( is_page( array( 42, 50 ) ) {
    Do something;
} else { 
    Do something else;
}

Open in new window


Ref: http://codex.wordpress.org/Function_Reference/is_page
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Trevor LocalAuthor Commented:
thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.