Custom page template custom title
-
I’m trying to create a custom template that I can use to pass a title argument to the header (among other things). I’m using the page to query non-wp tables in the database and show records from those tables. But I also want to set the title of the page based on my database queries. For example if I’m pulling a book from the database to show on the page, I want the page title to be “Book Title | My Site | Just another wordpress site”. I’ve made a custom page template that I have successfully assigned to a page, but I can’t see how to affect the page title. I see get_header() in the template file, but I don’t know how to pass anything to the header. Thanks.
P.s. I’ve used plugins like exec_php but that still doesn’t allow me change the title (as far as I know). Not to mention that writing php code in the wp page editor isn’t very efficient.
The topic ‘Custom page template custom title’ is closed to new replies.