Title: [Plugin: Query Wrangler] current class
Last modified: August 20, 2016

---

# [Plugin: Query Wrangler] current class

 *  Resolved [bart_behiels@yahoo.com](https://wordpress.org/support/users/bart_behielsyahoocom/)
 * (@bart_behielsyahoocom)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-query-wrangler-current-class/)
 * hi (excuse my english),
 * I like the plugin very much. But I would like it even more if it would be possible
   to apply a current class to the query widget. I’m using the query widget in my
   sidebar with only ‘post title fields’. It would be very interesting if it would
   behave more like a menubar.
 * Can anyone help me out?
 * [http://wordpress.org/extend/plugins/query-wrangler/](http://wordpress.org/extend/plugins/query-wrangler/)

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

 *  Plugin Author [Jonathan Daggerhart](https://wordpress.org/support/users/daggerhart/)
 * (@daggerhart)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-query-wrangler-current-class/#post-2644401)
 * Hmm… Off the top of my head, I can think of an easy way to do it with jQuery.
 *     ```
       jQuery(document).ready(function(){
         jQuery('.query-[query_slug]-wrapper a.query-field-link').each(function(i,element){
           if (jQuery(element).attr('href') == window.location.href){
             jQuery(element).addClass('my_custom_class');
           }
         });
       });
       ```
   
 * This should be very close to what you would need to do that. You would need to
   change [query_slug] and ‘my_custom_class’ to the correct values for your site.
 * This should be simple enough for QW to do, so I will add a class to a link if
   it is the ‘current page being viewed’ in the next major release (1.6).
 * Hope this helps.
 *  Thread Starter [bart_behiels@yahoo.com](https://wordpress.org/support/users/bart_behielsyahoocom/)
 * (@bart_behielsyahoocom)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-query-wrangler-current-class/#post-2644431)
 * thanks, I’ll try this one.

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

The topic ‘[Plugin: Query Wrangler] current class’ is closed to new replies.

 * ![](https://ps.w.org/query-wrangler/assets/icon-256x256.jpg?rev=3279076)
 * [Query Wrangler](https://wordpress.org/plugins/query-wrangler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-wrangler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-wrangler/)
 * [Active Topics](https://wordpress.org/support/plugin/query-wrangler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-wrangler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-wrangler/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bart_behiels@yahoo.com](https://wordpress.org/support/users/bart_behielsyahoocom/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-query-wrangler-current-class/#post-2644431)
 * Status: resolved