Forum
Event title in browser
Hi there Simple one no doubt but can't get it to work.
What is the code I need to output the Event Title in the Browser TITLE bar? Currently using:
<title><?php perch_events_event_field(perch_get('s'), 'eventTitle'); ?></title>
but it's not working.
Thanks
Rich
That should work. What happens?
It's blank after the middot (it should say Romantic night away only £79)
My code is: <title>Love Bedford Offers · <?php perch_events_event_field(perch_get('s'), 'eventTitle'); ?></title>
A page is here: https://www.lovebedfordoffers.co.uk.gridhosted.co.uk/offers/offer.php?event=2015-01-29-romantic-night-away-only-79
I think you need to add true at the end so it outputs it raw. So like so...
<?php perch_events_event_field(perch_get('s'), 'eventTitle', true); ?>
If you turn debug on for the page, what does it output?
Hi Drew I have debug on now on the page: https://www.lovebedfordoffers.co.uk.gridhosted.co.uk/offers/offer.php?event=2015-01-29-romantic-night-away-only-79
Have tried it with your suggestion Terry but still outputting nothing.
Your event slug is
event
on the query string, so change:to
Thanks Drew, got it working.
Another query, I'm trying to grab the company name to put into the TITLE too but I can only seem to get eventTitle to work whilst CompanyName (the ID) doesn't?
Still having issue getting the above to work, would be grateful for a solution.
If you need more than one field you should just use a template and
perch_events_custom()