If the error goes away when you change the theme, it’s possible that the issue is related to the child theme. It’s important to note that deleting the child theme will not delete any information stored in the database, as that information is stored separately from the theme files.
However, if you delete the child theme, any customizations or modifications that you made to the child theme’s files will be lost. This includes any custom CSS, functions, or templates that you may have added to the child theme’s directory.
Before deleting the child theme, you may want to try temporarily disabling it to see if the error persists. If the error goes away when the child theme is disabled, then you know that the issue is related to the child theme.
If you want to keep the child theme but still resolve the error, you may want to try updating the child theme’s code to address the issue. Alternatively, you may want to consider switching to a different theme or seeking assistance from a developer to help you resolve the issue.