Hi again,

#1. We use the Elementor widget to create the header, so it’s difficult to insert the php code here. You have to create a shortcode with php code, then embed this shortcode in header via shortcode widget.

Follow guide at: How to Add a Shortcode in WordPress? (Beginner’s Guide)

#2. I see you already selected config for this option: https://prnt.sc/1suezal