WordPress.org

Support

Support » How-To and Troubleshooting » Sidebar not working

Sidebar not working

  • Hi,

    My sidebar for the theme New Balance of Blue is not showing at all. Php is below. Any ideas what needs to be there so it works?

    </div>

    <div class=”widget”>

      <?php $postslist = get_posts(‘numberposts=10’);
      foreach ($postslist as $post) :
      setup_postdata($post);
      ?>

    • “><?php the_title(); ?>
    • <?php endforeach; ?>

    </div>

    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar(1) ) : ?>

    <?php endif; ?>

    </div><!–/sidebar–>

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi

    @esmi

    Forum Moderator

    Please post code snippets between backticks (`). Or use the WordPress pastebin and post the pastebin url here. It makes life easier for everyone.

    Like this:

    </div>
    
    <div class="widget">
    
    <?php $postslist = get_posts('numberposts=10');
    foreach ($postslist as $post) :
    setup_postdata($post);
    ?>
    
    "><?php the_title(); ?>
    <?php endforeach; ?>
    
    </div>
    
    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar(1) ) : ?>
    
    <?php endif; ?>
    
    </div><!--/sidebar-->

    ?

    is that something new?
    on the front page?
    on single posts?
    in the archives?
    if in some these cases, it could be because of one of the latest posts.
    you could try and set them back to draft in the dashboard, and see if this changes something.
    it might also help here if you could post a link to your site.

    edit:
    if the your posted code is fully what you have left as sidebar.php – then it is corrupted.
    reupload a new copy of sidebar.php.

    if you fixed most of your errors, it would likely fix it

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sidebar not working’ is closed to new replies.
Skip to toolbar