WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] No widgets showing in my sidebar (6 posts)

  1. MaddTechWF
    Member
    Posted 4 years ago #

    I'm not able to see any widgets that i put in my sidebar. Here is the code I'm using.

    Sidebar.php

    <div id="sidebar">
    	<?php // if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) : ?>
        <?php // endif; ?>
    </div>

    Functions.php

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
             'before_widget' => '',
             'after_widget' => '',
             'before_title' => '<div class="subpages"><h3>',
             'after_title' => '</h3</div>',
         ));
    ?>
  2. MaddTechWF
    Member
    Posted 4 years ago #

    Okay, I just noticed the comment //'s. I removed those but still nothing.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    On my theme's I have ampersands instead of pipes

    && rather than ||

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar ') ) : else : ?>

  4. MaddTechWF
    Member
    Posted 4 years ago #

    That didn't seem to fix it but thanks for the input.

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    I'm just trying to look through the differences from my code to yours...

    functions.php, above the before_widget line I have
    'name'=>'Sidebar',

  6. MaddTechWF
    Member
    Posted 4 years ago #

    Sweet... That fixed it. Thank you so much.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.