For the past week, I've been working on updating our mobile site and have encountered an issue with the footer. It loads perfectly fine on the home page but crashes when viewing a regular page. Strangely enough, both pages are using the same footer.php file.
If you'd like to take a look at the staging site where I'm making these changes, visit:
<?php
/**
* The template for displaying the footer.
*
*/
?><div class="clearfix"></div>
</div><!-- .site_content .inner-wrapper -->
</div><!-- .site_content -->
<?php if(!is_front_page()):?>
<?php if(!is_page(52)):?>
<div class="page-cta">
<h4 style="font-family: Georgia;font-size: 40px !important; font-weight: bold; color: #075aa0;">Free, No Obligation</h4>
<h5 style="font-size: 40px !important; font-weight: 500; line-height: .6 !important; margin-top: 0px; color: #075aa0;;">Disability Evalution</h5>
<hr style="border-top: 1px solid #39393b; width:90%;">
<p style="font-size: 30px !important;">Let us help you determine if you qualify for disability income<p>
<div style="height:20px;"></div>
<a title="Free social Security Evaluation" href="http://premierdism.staging.wpengine.com/contact-us/free-evaluation/">Free Evaluation</a>
</div>
<?php endif;?>
<img src="http://premierdism.staging.wpengine.com/wp-content/uploads/2016/09/Premier_Bottom_Logos.png" />
<?php else:?>
<div class="home-map">
<div class="inner-wrapper">
<?php
$args = array(
'numberposts' => -1,
'post_parent' => 56,
'post_type' => 'page',
'orderby' => 'title',
'order' => 'ASC'
);
$children = get_children( $args );
?>
<?php if($children):?>
<div class="state-list">
<p style="align:left; Color:#a32a2f; margin-bottom:0px;"><b>Click the map below<br>for more state information</b></p>
<hr style="margin-top: 0px; margin-bottom: 0px; margin-right: 0px; width: 570px; border-top: 2px solid #a32a2f;" />
<?p align="left">All 50 states and territories</p>
<a href="https://m.premierdisability.com/the-premier-difference/nationwide-disability-benefits/"><img src="http://premierdism.staging.wpengine.com/wp-content/uploads/2016/09/Premier_Map.svg" alt="Premier Disability offers nationwide help"/>
<div class="clearfix"></div>
</div>
<?php endif;?>
</div>
</div>
<?php endif;?>
<div class="clearfix"></div>
<div class="site-footer">
<div class="footer-disclamier">
<div class="inner-back">
<div class="inner-wrapper" style="background-color: #e3e3e3; width: 640px; margin: -20px 0px 0px -40px; padding: 20px 0px;">
<p class="sharelink">Keep in touch</p>
<div style="padding-bottom:80px;" class="social relative">
<div style="position: absolute; left: 20%;">
<a class="block left" href="https://www.facebook.com/PremierDisability" target="_blank"><img src="http://premierdism.staging.wpengine.com/wp-content/uploads/2016/09/Facebook-Icon.jpg" style="width:60px;"></a>
<a class="block left" href="https://plus.google.com/110325482012270783070" target="_blank"><img src="https://m.premierdisability.com/wp-content/uploads/2016/09/GooglePlus-Icon.png" style="width:60px;"></a>
<a class="block left" href="https://twitter.com/PremierDisSvcs" target="_blank"><img src="https://m.premierdisability.com/wp-content/uploads/2016/09/Twitter-Icon.png" style="width:60px;"></a>
<a class="block left" href="https://www.instagram.com/premierdisabilityservices/" target="_blank"><img src="https://m.premierdisability.com/wp-content/uploads/2016/09/Instagram-Icon.png" style="width:60px;"></a>
</div>
<div style="padding: 0px 109px; margin-top: 90px;">
<a href="https://itunes.apple.com/us/app/premier-ssd/id1143571193?mt=8"><div class="applink Apple"></div></a>
<a href='https://play.google.com/store/apps/details?id=com.goodbarber.premierdis&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><div class="applink Google"></div></a>
</div>
</div>
</div>
<div class="small-disclaimer"><p style="font-size:12px !important;margin-top: 20px;line-height:1.2;"><b>Disclaimer:</b> We are a privately owned, nationwide advocacy service. Any information you receive on this site is not intended to be, nor should it be construed as, legal advice. Using this website or contacting us does not create any type of legal or fiduciary relationship. Premier Disability Services, LLC is neither affiliated with nor endorsed by the Social Security Administration or any other government agency or entity.</p></div>
</div>
</div>
<div class="copyright">
<div class="inner-back">
<div class="inner-wrapper">
<?php Theme::getCopyright()?>
</div>
</div>
</div>
</div><!-- .site-footer -->
</div><!-- #main .wrapper -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>