最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - My website is not showing Footer section

programmeradmin0浏览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=";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='' 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=";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='' 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!

** 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!

Share Improve this question edited Jun 28, 2019 at 12:42 Angelica Cast asked Jun 28, 2019 at 9:29 Angelica CastAngelica Cast 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 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' );
}
?>
发布评论

评论列表(0)

  1. 暂无评论