Title: Conditionally load assets
Last modified: March 9, 2024

---

# Conditionally load assets

 *  Resolved [JeanPaulH](https://wordpress.org/support/users/djr/)
 * (@djr)
 * [2 years ago](https://wordpress.org/support/topic/conditionally-load-assets/)
 * Hi.I like the plugin, but could you please load the needed assets (js/css) conditionally
   so they’re only loaded when needed by the plugin? Right now Tambar’s js and css
   files are also loaded for anonymous users which leads to poor page performance
   and a lower Pagespeed and GTMetrix score.
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Yan Metelitsa](https://wordpress.org/support/users/yanmetelitsa/)
 * (@yanmetelitsa)
 * [2 years ago](https://wordpress.org/support/topic/conditionally-load-assets/#post-17507183)
 * Hello! Thank you very much, this is a very good comment and suggestion. I have
   updated the plugin version to 2.1.9.
 * Since this version Tambar includes CSS and JS files (and changes the body tag
   classes) only if the [is_admin_bar_showing()](https://developer.wordpress.org/reference/functions/is_admin_bar_showing/)
   function returns true.

Viewing 1 replies (of 1 total)

The topic ‘Conditionally load assets’ is closed to new replies.

 * ![](https://ps.w.org/tambar/assets/icon.svg?rev=3144664)
 * [Tambar – Bottom Admin Bar](https://wordpress.org/plugins/tambar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tambar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tambar/)
 * [Active Topics](https://wordpress.org/support/plugin/tambar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tambar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tambar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Yan Metelitsa](https://wordpress.org/support/users/yanmetelitsa/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/conditionally-load-assets/#post-17507183)
 * Status: resolved