A bit of further detail... What I want to do is to run each page through some logic that may or may not change the <title> in the <head>. Basically, I was hoping to do something like this IF I need to change the <title> tag in the head...:
$newTitle = 'New <head> <title>';
$document = JFactory::getDocument();
$document->setTitle($newTitle);
I think the challenge here is that, if I use the "Custom Content" box in Gantry5 under "Head Properties" to get some code inserted (via Jumi, for example), the code above gets inserted too late in the Joomla game to take the action shown (changing the title). That is to say, the $document->setTitle has no effect at that point. I noticed this because, if I paste the code shown above at the top of the index.php file for my Gantry5 theme (using Notio, btw), it actually does work -- the title indeed changes.
So... if I wanted to do a bit of a hackish solution, I could require my code at the top of the index.php file for my theme. That would definitely work. I mean, it's a hack, but it's one line of code, so I could live with it, I suppose. Just wondering if there is some other easy way to go about this, short of writing a formal plugin.