Title: Category Widget
Last modified: April 4, 2023

---

# Category Widget

 *  Resolved [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/)
 * I have a list of my categories on the left. Is there a way of indicating which
   category has been selected and is being displayed on the right?displayed? (highlight
   text, show text in a different color, etc.)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcategory-widget-23%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/category-widget-23/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/category-widget-23/page/2/?output_format=md)

 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16627141)
 * Add the following CSS to the _theme’s_ custom CSS area found in the Customizer:
 *     ```wp-block-code
       .widget_cnw_categories li.cat-item.current-cat {
           background-color: #666;
           padding: 6px 12px;
       }
   
       .widget_cnw_categories li.current-cat a {
           color: #fff;
       }
       ```
   
 * Tweak the colors as desired.
 * I hope this helps; please let me know.
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16627147)
 * Oh, sorry I forget to mention what will change…
 * This will make the currently active category have a background color with white
   text. I chose a grey color from the theme for the background color.
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16627165)
 * Thank you Steven,
 * I added this CSS which sort of worked. It does highlight a category but does 
   not change when I select a new category. (see [https://1963mustangsreunion.com/class-members/](https://1963mustangsreunion.com/class-members/))
 * .widget_cnw_categories li.cat-item.current-cat {
   background-color: #2c651a;padding:
   6px 12px;}
 * .widget_cnw_categories li.current-cat a {
   color: #fff;}
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16627317)
 * Are you using any page caching on your site with a plugin or web host service?
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16627343)
 * No, I don’t think so (searched both plugins and host). It doesn’t seem to be 
   working at all. 🙁
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16627536)
 * Yes, there is one in fact
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16629659)
 * Ok, all caching solutions provide some method of excluding pages. You need to
   exclude the `/class-members/`page. This way, a static page is not served, and
   the dynamic, active category class can be set, allowing the custom CSS to style
   the active category appropriately.
 * I hope this helps; please let me know.
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16629912)
 * Thank you again. I excluded the page and the highlighted category is showing 
   but it still does not change when a different category is selected.
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16633524)
 * OK, first, apologies; page caching is only one part of the issue. I had forgotten
   that the widgets utilize a technique called fragment caching. Because the widgets
   are cached, the active category class can not be set, so the CSS would not work.
 * I’ll have to add a method either with a filter or a setting to disable the fragment
   cache for the widgets. I’m leaning toward a filter. I”ll work on this and release
   an update to the Widget Pack.
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16633543)
 * Darn, it there anything I can do in the meantime? Any idea when you’ll have time
   for an update?
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16634400)
 * **RE: there anything I can do in the meantime?**
 * Sorry, no.
 * **RE: Any idea when you’ll have time for an update?**
 * Sorry, no ETA. I did work on this all afternoon, but unfortunately, I did not
   make much progress.
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16636302)
 * Would I be able to do this with “**Enhanced Categories**“? If so, can i get a
   credit for the widgets plugin and get this instead?
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16636853)
 * **RE: Would I be able to do this with “****Enhanced Categories**“?
 * Sorry, the Enhanced Categories add-on would not affect the Categories Widget’s
   use of the fragment cache optimization.
 * I just pushed an update to the widgets, version 2.12. I’ve implemented a filter
   that can be hooked into to disable the fragment cache for the Categories widget.
 * Install and activate the [Code Snippets plugin](https://wordpress.org/plugins/code-snippets/).
   Add and activate a new code snippet with the following code to disable the Categories
   widget fragment cache:
 *     ```wp-block-code
       add_filter(
       	'Connections_Directory/Widget_Pack/Widget/Category/Use_Fragment_Cache',
       	'__return_false'
       );
       ```
   
 * With this code snippet active and the CSS code I supplied earlier, the active
   category will be highlighted.
 * I hope this helps; please let me know.
 *  Thread Starter [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * (@tiabohinc)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16637446)
 * Yay, it works!! Thank you so much for your great customer service.
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/#post-16642652)
 * I just added this to the Widget Packs documentation in the FAQs section to help
   make sure this info is more widely available to others who may want to accomplish
   the same:
    - [https://connections-pro.com/documentation/widget-pack/#FAQs](https://connections-pro.com/documentation/widget-pack/#FAQs)
 * I would genuinely appreciate a review if you have a moment, as they really make
   a difference.
    - [https://wordpress.org/plugins/connections/](https://wordpress.org/plugins/connections/#reviews)
 * Thanks in advance for your time!

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/category-widget-23/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/category-widget-23/page/2/?output_format=md)

The topic ‘Category Widget’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/connections_2b7e99.svg)
 * [Connections Business Directory](https://wordpress.org/plugins/connections/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/connections/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/connections/)
 * [Active Topics](https://wordpress.org/support/plugin/connections/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/connections/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/connections/reviews/)

## Tags

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

 * 16 replies
 * 2 participants
 * Last reply from: [tiabohinc](https://wordpress.org/support/users/tiabohinc/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/category-widget-23/page/2/#post-16646397)
 * Status: resolved