WordPress.org

Ready to get started?Download WordPress

Forums

Conditional Output from Widget (1 post)

  1. Joshua Lyman
    Member
    Posted 6 years ago #

    I am currently widgetizing a theme that I made from a while ago, and have a question regarding how to work with the widget codes used in sidebars.

    I have a widget sidebar defined, but it does not always show up, or it is a widget sidebar that is optional. However, when it does show up, it needs to be wrapped in a container layer, for display purposes. I can't do this through the before_ or after_widget variables.

    Is there a way I can test to see if the sidebar has been defined and called and output something before it spits out the rest of the code for the widget? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic