How do I remove the pages widget that displays on pages in my sidebar by default? Do I need to edit the parent “sidebar.php” file and comment out something? I don’t want pages showing up at all.
It should disappear once you populate the sidebar with your own content, could you try that out please?
Follow up: I have created a custom child theme and a custom template based on page.php. I only want the sidebar to show up on those pages is that possible?
Yes you should be able to get a sidebar into that template: https://developer.wordpress.org/reference/functions/get_sidebar/, though I would suggest that you set that in the Layout menu on each page instead.