Hey Veronika,
Yes. Theme Options are saved in the database and it won’t get overwritten by updates.
Please just note that we do not guarantee future compatibility for all custom codes. Custom codes provided in this forum were only meant to be a guide to help users get started extending the theme.
We also have created Pro, an advanced version of X where you could build a custom header so cases like this is achievable without custom coding. If you can, I’d recommend that you upgrade to Pro especially that we could not always provide custom coding guidance.
Thanks.