Use before_widget in sidebar.php? (1 post)

  1. mikedev
    Posted 4 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic