Title: How to conditional CSS loading with widget setting?
Last modified: August 20, 2016

---

# How to conditional CSS loading with widget setting?

 *  [Xonox](https://wordpress.org/support/users/xonox/)
 * (@xonox)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/how-to-conditional-css-loading-with-widget-setting/)
 * Hi,
 * I’ve been trying a lot of ways to do this but I’m not getting it. I’m making 
   a simple widget which has an option to load a CSS file. I need to do two things:
 * 1. Load (or don’t load) CSS file according to widget setting.
 * 2. Load CSS file only when widget is used and CSS setting is true.
 * You can see the my widget structure here:
    [http://pastebin.com/GkvFJLrZ](http://pastebin.com/GkvFJLrZ)
 * I need a hand to figure out, how and where I should make it.
 * Thanks,

The topic ‘How to conditional CSS loading with widget setting?’ is closed to new
replies.

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [Xonox](https://wordpress.org/support/users/xonox/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/how-to-conditional-css-loading-with-widget-setting/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
