Disable sidebar in single post view

Im trying to disable the sidebar on the single post view which I’ve managed to do using

array(
  'is_singular', 

however this disables it on all single post views. Is there a way to only exclude it for a particular category’s single view?

Create your own function and reference that in the sidebar array.

function is_singular_and_is_category() {
  return  (is_singular('post-type') && is_category('cat-slug'));
}

Thanks for the quick response, would I add this in the theme functions file?

How would I reference it in the sidebar array?

With the name of the function, as you would with any of the other conditionals:

array(
  'is_singular_and_is_category',

Thanks, I still can’t get it working though. This is the code I have in the config file

    function roots_display_sidebar() {
  $sidebar_config = new Roots_Sidebar(
   
    array(
      'is_404',
      'is_front_page',
      array('is_category', array('portfolio'))
    ),
   
    array(
      'template-custom.php',
    ));

  function is_singular_and_is_category() {
  return  (is_singular('post-type') && is_category('portfolio'));
}

array(
      'is_singular_and_is_category',
    ));

Please read or re-read through the documentation on the sidebar and try to see where you’ve gone wrong.
Everything you need short of the full code is already here.