I am sure this has probably been asked before, but I've tried all sorts of searches and cannot find a definitive answer. Maybe it's just not possible!
I have a directory of users (displayed using an
When you click on an agent, it goes to another page, "agent profile" which uses
Using some rewrite rules I can access the query var 22 and can use that.
I now how ever want to re-write the page title and meta descriptions based on the current agent. So the webpage /agents/profile/22 would have a title of "Viewing agent 22" for example. If you view agent 23 it would then change the page title to "Viewing agent 23".
How can I do this from within the template? I've created various hooks in my functions file, but I obviously cannot access these at the page template level. I'd rather not have a different header for just this page if possible.
Any ideas? I am totally stuck!!