Hook / functions.php Question

That is much clearer - I understand what you are wanting to achieve now. The one consideration about directly “jumping” to the anchor for the specific part of the page is that it is dependent on the contents of the page being loaded.

An advantage of starting at the top of the page and scrolling to an anchor is that in most cases it gives sufficient time for the page to load so the user should be able to view it more completely/reliably. If this is not a concern (i.e. your page loads very fast or you are fine with some incremental loading), then I recognise it may be preferable to jump directly to it as you describe.

Also, you may find these threads interesting: