[NSFW] Hide category box
-
Good day,
How do I hide the ‘categories’ search box?
The page I need help with: [log in to see the link]
-
Please edit the page in the WordPress admin.
Add
enable_category_select=falseto the existing[connections]shortcode on the page.Example:
[connections enable_category_select=false]Save the change.
I hope this helps; please let me know.
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”]
It appears you are now using this developer addon:
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.
OMG it worked!! Thank you SO So much!
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>]
Try using this CSS
form#cn-cat-select { margin: 0 auto; width: 100%; display: block; text-align: center; }Worked great! Thank you for your amazing support!
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
That would require a bit of JavaScript to accomplish.
After a quick web search I found this solution:
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()) };Thank you – but this does not seem to be working 🙁 where exactly should this code be placed?
Try adding it using the Code Snippets plugin:
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
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….
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/
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…..
I do offer customization services. Please contact me using the Contact link at the very bottom of the following page:
The topic ‘[NSFW] Hide category box’ is closed to new replies.