• I have multiple sidebars and load them into specific page templates using get_sidebar( 'xyz' ). I want to be able to check to see if the page is showing that particular sidebar. Better yet, I would like to test to see if a particular widget is showing. In this case, I happen to know it will be in a specific sidebar.

    I am looking to wp_enqueue_script() a script if a specific widget is showing on the page or in my case if a specific sidebar is showing.

    Currently i’ve tested with is_active_sidebar() and is_active_widget(). Both of these return TRUE even if the sidebar ‘xyz’ is not loaded into the particular page using get_sidebar( 'xyz' ).

    I hope this makes some sort of sense. Thanks in advance!

  • The topic ‘Check if specific widget is on page/showing’ is closed to new replies.