WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar does not display widgets (2 posts)

  1. chassm
    Member
    Posted 6 years ago #

    I just bought a premium theme that I've been customizing and unfortunately am not getting the support the seller advertised when I bought the theme so if anyone can help with this I'd appreciate it.

    This theme has two sidebars which currently display, however the first sidebar only displays a tag cloud, the second sidebar displays anything I add to it from the available widgets list in wordpress. When I look at the code in the lsidebar.php (the sidebar in question) all it originally had was this:

    <div class="lsidebar">

  2. <h2>Tag Cloud</h2>
    <?php wp_tag_cloud('smallest=8&largest=14&number=30&orderby=name'); ?>
  3. </div>

    The sidebar shows up in the sidebar list in the widget options in wordpress but when I dragged and dropped widgets in it, nothing would show up,. After doing some research I saw that I needed to add some code to enable the sidebar to display widgets, so I added the necessary code to the lsidebar.php file and now it looks like this:

    <div class="lsidebar">

      <?php if ( function_exists(’dynamic_sidebar’) && dynamic_sidebar(2) ) : else : ?>

    • <h2>Tag Cloud</h2>
      <?php wp_tag_cloud('smallest=8&largest=14&number=30&orderby=name'); ?>
    • <?php endif; ?>

    </div>

    Even after doing this, dragging and dropping widgets to this sidebar does not show anything in the display page, the only thing that appears is the tag cloud. I've tried moving the code around but I often end up with fatal errors.

    By the way, the contents of the functions.php file are:

    <?php
    if ( function_exists('register_sidebars') )
    register_sidebars(2);
    ?>

    So if anyone has run into this before please let me know, and I'd appreciate any direction.

    Thanks.

  4. chassm
    Member
    Posted 6 years ago #

    Anybody!?

Topic Closed

This topic has been closed to new replies.

About this Topic