WordPress.org

Ready to get started?Download WordPress

Forums

Can I restrict widgets to sidebar or footer area? (3 posts)

  1. billa1
    Member
    Posted 2 years ago #

    I have two widget areas in my theme, sidebar and footer. Now I have developed few widgets. Is it possible to restrict a widget to a specific area? For example, widgetA can only go to sidebar, but not to Footer area. Similarly widgetB can only go to footer but not sidebar?
    The reason for doing is that some widget's CSS style does not fit in sidebar, or footer.
    Thanks.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Is it possible to restrict a widget to a specific area?

    Nope. Not as far as I am aware.

    some widget's CSS style does not fit in sidebar, or footer.

    So re-style it based on whether it's in the sidebar or in the footer.

  3. Josh Stauffer
    Member
    Posted 2 years ago #

    I'd like to know the answer to this myself. My thought is to return nothing in the widget code if it is in a particular widget area. Not sure yet how to do this.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags