actually, it seems any form of typing in a widget causes the error. Calendar widget seems ok uneditted
Hi @diwoodcock,
Apologies for the delay in reply here! Automattic (the team behind the Hexa theme) were away at our annual company retreat last week, but we’re back now. 🙂
Are the errors you mentioned appearing at Appearance > Widgets in your WordPress admin area? If so, the child theme may not be the cause.
As a first troubleshooting step, please try deactivating any plugin that you have active one by one to see if any individual plugin is causing the error.
Let me know how that goes and we can work from there.
Hi Siobhan,
The error shows up both; when customising widgets in live preview of child theme, and if I activate the child theme and edit appearance>widgets
Only had 2 plugins active, still get the error in live preview when both have been deactivated
If it makes any difference, the widget which did copy across was a twitter timeline
@diwoodcock: Do you experience the error when the parent theme is active? If not, could you please copy/paste the code that you’ve entered into your child theme’s functions.php file in your next reply.
I also recommend removing this last line provided in the Codex code snippets to see if that resolves the issue:
?>
Thanks!
No, the parent theme behaves normally.
Child theme now works having removed the ?>
Thank you (although seems unnatural to leave the structure unclosed)
Hi @diwoodcock,
I’m glad that resolved the error!
Omitting the closing PHP tag at the end of functions.php is actually considered best practise and recommend in WordPress coding standards here:
https://make.ww.wp.xz.cn/core/handbook/best-practices/coding-standards/php/#remove-trailing-spaces
You can find some good discussion as to the technical reasoning behind this here:
http://stackoverflow.com/questions/4410704/why-would-one-omit-the-close-tag
Hope that helps out.