Hi – I was having the same issue. I previously had created a list-widget.php in my Child theme, so I updated that file with your code and put it right at the top under the <?php is that correct? It’s working, so I just wanted to double check the placement of that code.
Thanks!