WordPress.org

Ready to get started?Download WordPress

Forums

WooSidebars
[resolved] Check if ther is widget (2 posts)

  1. Erik
    Member
    Posted 1 year ago #

    Hi, Great plugin!

    I just like to check if there is any widgets in a widgets area. Something like this:

    <?php if ( woo_sidebar[ 'banner' ] == "true" ) echo 'with-banner'; ?>

    is it a way to do this?

    Best regards,
    Erik

    http://wordpress.org/extend/plugins/woosidebars/

  2. Matty Cohen
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Erik,

    You can use standard WordPress functions for that.

    You'd use is_active_sidebar( 'sidebar-name-here' ) to check if the sidebar has widgets or not. :)

    Thanks and regards,
    Matty.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.