0

** EDITED **

Hello im new with Wordpress, Im having a problem with widgets (sidebar and footer) my footer.php is not being rendering unless I delete sidebar.php from files.

Ive tryed to debug but there's no errors.

This is the Sidebar.php code

<?php $loc = '/'; if ( ! is_active_sidebar( 'sidebar-1' ) ) {
return; } ?>

<?php dynamic_sidebar( 'sidebar-1' ); ?>

<?php 
if (function_exists('pll_current_language')) $lang = pll_current_language(); else $lang ='en'; ?>
<div class="hidden-sm hidden-xs">

    <p>&nbsp;</p>

    <?php
    if ($lang == "en" && (date('n')> 10 || date('n') < 5 ))
    {
      ?>
    <h4>Snow Forecast</h4>
      <!-- Beginn Schneehoehen.de Widget Integration -->

      <div align="left" id="containerschnee hoehen" style="margin:16px 0px 16px 0px"><iframe width="100%" height="410" scrolling="no" frameborder="0" style="background:#fff; border:1px solid #999; overflow:hidden;" id="sh_frame" name="sh_frame" src="http://www.schneehoehen.de/widgets/details/widget_schneebericht/kitzbuehel?size=small&theme=black&language=en&weather=true&links=true"></iframe><div style='background:#FFF; text-align:left; border:1px solid #999; width:100%; padding:6px 7px 5px 8px; margin-top:5px;'><a id='sh_anchor' title='Kitzbühel und Kirchberg,ski holiday, snow depth, ski resort, winter holiday' href='http://www.schneehoehen.de/skigebiete/info/kitzbuehel' style='text-decoration:none; color:#999; font-size:9px; font-weight:normal; font-family: georgia; font-style:italic; line-height:13px;' target='_blank'>More information about the ski resort Kitzb&uuml;hel und Kirchberg on Schneehoehen.de</a></div></div>

      <!-- Ende Schneehoehen.de Widget Integration -->
      <?php
    }
    elseif(date('n')> 10 || date('n') < 5 )
    {
      /* German */
      ?>
      <h4>Schneevorhersage</h4>
      <!-- Beginn Schneehoehen.de Widget Integration -->

      <div align="left" id="containerschneehoehen" style="margin:16px 0px 16px 0px"><iframe width="100%" height="410" scrolling="no" frameborder="0" style="background:#fff; border:1px solid #999; overflow:hidden;" id="sh_frame" name="sh_frame" src="http://www.schneehoehen.de/widgets/details/widget_schneebericht/kitzbuehel?size=small&theme=black&language=de&weather=true&links=true"></iframe><div style='background:#FFF; text-align:left; border:1px solid #999; width:100%; padding:6px 7px 5px 8px; margin-top:5px;'><a id='sh_anchor' title='Kitzbühel und Kirchberg,Skiurlaub, Schneeh&ouml;hen, Skigebiete, Winterurlaub' href='http://www.schneehoehen.de/skigebiete/info/kitzbuehel' style='text-decoration:none; color:#999; font-size:9px; font-weight:normal; font-family: georgia; font-style:italic; line-height:13px;' target='_blank'>Weitere Infos zum Skigebiet Kitzb&uuml;hel und Kirchberg auf Schneehoehen.de</a></div></div>

      <!-- Ende Schneehoehen.de Widget Integration -->
      <?php
    }
    ?>

Shopping Links

    if ($lang == 'en') {
        $country = 'uk';
    } else {
        $country = 'at';
    }
    if ( (date('n')> 10 || date('n') < 5 )) {
        require('include/winter_gear.php');
    } else {
        require('include/summer_gear.php');
    }
    ?> -->
</div>

Is there any problem with sidebar code or any configuration in another file?

I will appreciate all your answers, thanks a lot!

1

Please add below code in your footer.php file above included JavaScript files :

<?php
if ( is_active_sidebar( 'footer-1' ) ){
    dynamic_sidebar( 'footer-1' );
}

if ( is_active_sidebar( 'footer-2' ) ){
    dynamic_sidebar( 'footer-2' );
}

if ( is_active_sidebar( 'footer-3' ) ){
    dynamic_sidebar( 'footer-3' );
}
?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.