jaschulz
Member
Posted 2 years ago #
As I understand it, header.php is loaded last when the user moves to a new page. So, since I want, each time a page is loaded, to being the focus to an element (which exists on all my pages), I presume what I need to do is add a php call to the header, but I know very little about php, and I have no idea what that function should look like.
Any help would be appreciated.
Thanks,
JAS
As I understand it, header.php is loaded last when the user moves to a new page.
Um... no it isn't. It's the second file that is loaded from your theme (functions.php being the first as far as I recall).
jaschulz
Member
Posted 2 years ago #
Well, in any case, the following does NOT do what I need:
<body onload="document.getElementById('myElement').focus();" >
Any ideas about what would work?
Thanks,
JAS
You might be best starting here.