Is there a way to display a venue’s information as per usual (map, title, etc.) even when there are no upcoming events at that venue? In addition, can I link to a venue’s map from within the multi-venue map’s tooltip? I was able to edit the tooltip so that individual events will link to their permalink, but can’t quite get the venue name to link to the venue’s permalink.
I tried doing some tinkering in some of the files to no avail. Strangely, after reverting them all back to how they were before, every edit I make within WordPress gives me:
> Warning: Cannot modify header information – headers already sent by
> (output started at
> /home/laughnic/public_html/wp/wp-content/themes/responsive/includes/functions.php:605)
> in /home/laughnic/public_html/wp/wp-includes/pluggable.php on line 876
Although any further changes I make do get made.
Thanks in advance!
Vaughan
Yes – and actually the default templates will be changing in 1.7 to do this as well.
Aside from the template files you should avoid editing any plug-in files, as this will be lost with an update (which is why the templates should be moved to your theme before editing).
If you wish to edit things that are not in templates please use the hooks. (The hook documentation is a working progress, so feel free to use the forums if you’re not sure which hook to use).
Regarding the error – you’ve probably made a change to some file somewhere which is outputting to the page before the headers are sent. You can find out more by turning debug mode on.
Venue information
In the venue template just move the information from inside the loop (inside the have_posts()
) – i.e. the stuff thats printing the venue description / map. Then pass the functions the venue ID. E.g.:
$venue_id = (int) get_queried_object_id(); //In the venue template this should return the venue ID
$name = eo_get_venue_name($venue_id);
$description = eo_get_venue_description($venue_id); //etc
//Prints the map
echo eo_get_venue_map($venue_id);
Venue tooltip
For adding/removing content to the tooltip, see this page (I’ve just added some examples).
Any questions, just ask 🙂
Stephen Harris
Thanks for that! I’m going to be making a list this weekend of every file I’ve edited along the way so that I can keep a backup of them and what changes are made so I can upgrade themes and plugins without any worries. I’ve copied the template files listed within the settings page of EO and have been using those for editing.
As for the error, I found that other people online had similar issues with a myriad of different plugins, themes and even different CMS software! It seemed that adding “ob_start();” on the second line of includes/functions.php seemed to make the problem go away.
I’m new to wordpress so I’m not familiar with hooks but I’ll have a wee look into them, thanks!
I was trying to just copy the map display code to various sections (having posts, not having posts, etc.), but the map would just display blue and I couldn’t pull a venue name. I’m sure it’s just me being udmb and not knowing wordpress too well yet, but if it’s sorted in 1.7 I’ll just wait it out. 🙂
Vaughan