Support » Plugins » Hacks » Use before_widget in sidebar.php?

  • I want to style an item in a sidebar as if it were a widget.

    I tried this code in sidebar.php, but it doesn’t display the widget wrapper:

    <?php echo $before_widget ?>
    my code
    <?php echo $after_widget ?>

    It seems to only work in functions.php. Is there a way to get before_widget to work in a template like sidebar.php?

  • The topic ‘Use before_widget in sidebar.php?’ is closed to new replies.