Title: active_callback on is_active_widget
Last modified: October 20, 2016

---

# active_callback on is_active_widget

 *  Resolved [LebCit](https://wordpress.org/support/users/lebcit/)
 * (@lebcit)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/active_callback-on-is_active_widget/)
 * Hello again (last time on github),
    I’m posting here since it not an issue but
   a question.
 * I’m wondering, tried a lot, if it’s possible to use
    **is_active_widget(”, ”,‘
   widget-ID’)** as an **active_callback** ? I’m just trying to hide a color control
   if a specific widget is not active.
 * Can’t use required since it’s not depending on other field(s) value(s),
    and 
   struggled a lot, with no result, to create a custom callback function but i don’t
   know yet how to **return** an **if** statement in php to reproduce this example
   by using **if(is_active_widget(”, ”, ‘widget-ID’))**
 *     ```
       function my_custom_callback() {
           return ( is_singular( 'recipe' ) ) ? true : false;
       }
       ```
   
 * [‘active_callback’ option](https://github.com/aristath/kirki/issues/227)
 * Thanks a lot in advance for your help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/active_callback-on-is_active_widget/#post-8345352)
 * I’m afraid Kirki doesn’t have anything for that…
    You’ll have to use the WP Customizer
   API and write some custom JS to evaluate if the widget is active.
 *  [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/active_callback-on-is_active_widget/#post-8359299)
 * For additional follow-up, see conversation at [https://make.xwp.co/2016/07/24/dependently-contextual-customizer-controls/#comment-2293](https://make.xwp.co/2016/07/24/dependently-contextual-customizer-controls/#comment-2293)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘active_callback on is_active_widget’ is closed to new replies.

 * ![](https://ps.w.org/kirki/assets/icon-256x256.jpg?rev=3518366)
 * [Kirki – Freeform Page Builder, Website Builder & Customizer](https://wordpress.org/plugins/kirki/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kirki/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kirki/)
 * [Active Topics](https://wordpress.org/support/plugin/kirki/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kirki/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kirki/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/active_callback-on-is_active_widget/#post-8359299)
 * Status: resolved