Hi, I’ve noticed the single venue page uses the events template to display the information…
I’ve tried the following to overwrite the template:
single-tribe_venue.php
archive-tribe_venue.php
Either of these work, is there anyway to override the single venue template?
Barry, that wasn’t really the question. I’ve already done that.
The single-venue.php template is wrapped in a template choosen via the ui and it is the template for the events. I want venue list to be wrapped in its own template
The easiest way would be to use the same wrapper template, whether that’s ecp-single-template.php or something else, and insert a conditional statement to detect if the view is for a single venue (and load a different template from there if so).
Depending on what you’re comfortable with you could alternatively filter the selection of template using tribe_events_template_ecp-single-template.
I used this inside the main template, works a charm, I was just worried about server load:
$ptype = get_post_type( $post->ID )
if( $ptype == “tribe_venue” ) :
I wouldn’t be too worried about server load, but if it is a real concern you could consider using the filter approach to dictate which template is loaded right off the bat.
In any case, so long as you’ve got a working solution you’re happy with that’s the main thing 🙂 … but let me know if there’s anything else we can help with.
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
The topic ‘Single Venue Template override’ is closed to new replies.