Title: <abbr title="Not Safe For Work / Mature content">[NSFW]</abbr> Hide category box
Last modified: June 20, 2022

---

# [NSFW] Hide category box

 *  Resolved [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/)
 * Good day,
 * How do I hide the ‘categories’ search box?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhide-category-box%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/hide-category-box/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/hide-category-box/page/2/?output_format=md)

 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15753470)
 * Please edit the page in the WordPress admin.
 * Add `enable_category_select=false` to the _existing_ `[connections]` shortcode
   on the page.
 * Example: `[connections enable_category_select=false]`
 * Save the change.
 * I hope this helps; please let me know.
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15755117)
 * Thank you – it does not seem to be working:
 * [connections template=”slim-plus” image_fallback=”none” enable_search=’TRUE’ 
   enable_pagination=’TRUE’ enable_category_select=’FALSE’ show_addresses=’TRUE’
   str_work_addr=”Work”]
 * Page: [https://unityhealth.co.za/find-a-network-provider/](https://unityhealth.co.za/find-a-network-provider/)
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15756972)
 * It appears you are now using this developer addon:
    - [https://connections-pro.com/quicktip-show-no-entries-until-user-performs-a-search/](https://connections-pro.com/quicktip-show-no-entries-until-user-performs-a-search/)
 * The only way to remove the category dropdown is to edit the developer addon.
 * Edit the addon plugin you downloaded.
 * Look for this line:
 * `$category = cnTemplatePart::category( $categoryProperties );`
 * Change it to:
 * `// $category = cnTemplatePart::category( $categoryProperties );`
 * The look for this line:
 * `$replace = $formOpen . $category . $search . $formClose;`
 * Change it to:
 * `$replace = $formOpen . $search . $formClose;`
 * I hope this helps; please let me know.
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15757053)
 * OMG it worked!! Thank you SO So much!
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15757097)
 * Literally this is my LAST question Im sorry! How do I center align it? Its currently
   sitting on the left and here is the short code;
 * [connections template=”slim-plus” image_fallback=”none” enable_search=’TRUE’ 
   enable_pagination=’TRUE’ enable_category_select=’FALSE’ show_addresses=’TRUE’
   str_work_addr=”Work”<center>]
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15758158)
 * Try using this CSS
 *     ```
       form#cn-cat-select {
           margin: 0 auto;
           width: 100%;
           display: block;
           text-align: center;
       }
       ```
   
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15758930)
 * Worked great! Thank you for your amazing support!
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15759103)
 * Geez my client is being sticky – I hope this will be the last thing Im sorry!
   When you click on the search icon it still brings up the full list. Any chance
   that we can disable that d=function? The client does not want users to have access
   to the full list, only when they type in their area
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15762101)
 * That would require a bit of JavaScript to accomplish.
 * After a quick web search I found this solution:
    - [https://stackoverflow.com/a/64309355/5351316](https://stackoverflow.com/a/64309355/5351316)
 * The working example code from that post:
 *     ```
       const post = document.querySelector('form');
       post.oninput = function() {
         post.querySelector('button').disabled = [...post.querySelectorAll(':scope > [name]')]
           .some(input => !input.value.trim())
       };
       ```
   
 * I think to make it work with your setup it would require this slight modification:
 *     ```
       const post = document.querySelector('form#cn-cat-select');
       post.oninput = function() {
         post.querySelector('button').disabled = [...post.querySelectorAll(':scope > [name]')]
           .some(input => !input.value.trim())
       };
       ```
   
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15766533)
 * Thank you – but this does not seem to be working 🙁 where exactly should this
   code be placed?
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15767742)
 * Try adding it using the Code Snippets plugin:
    - [https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)
 * I have not tried the code myself, so, you may have to debug/tweak it further.
   However, I am unsure what would need to be changed beyond what I already suggested.
   Perhaps it is not working because the code is not on the page … I took a look
   at the page source and did not see it
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15769547)
 * Would it be possible to give you WP access to have a look? Im not that well versed
   with custom coding etc and so very close to getting this right….
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15772854)
 * Hi there – this plugin broke the site and left a line of code at the top bar.
   I deleted the plugin, it was still there, I restored a site backup from before
   the plugin was installed – it was still there. Their support Is not getting back
   to me. PLEASE HELP!
 * See here:[https://unityhealth.co.za/](https://unityhealth.co.za/)
 *  Thread Starter [webture](https://wordpress.org/support/users/webture/)
 * (@webture)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15772962)
 * Hi! OK I managed to get rid of that code left behind from code snippets. Is there
   anything else you can do to assist with the search icon being clicked on and 
   showing all the results? If not, can you maybe suggest an alternative solution/
   plugin? Willing to pay extra if there is additional work to be done for this…..
 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/#post-15775784)
 * I do offer customization services. Please contact me using the Contact link at
   the very bottom of the following page:
    - [https://connections-pro.com/](https://connections-pro.com/)

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

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

The topic ‘[NSFW] Hide category box’ 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

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 16 replies
 * 2 participants
 * Last reply from: [webture](https://wordpress.org/support/users/webture/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/hide-category-box/page/2/#post-15776465)
 * Status: resolved