Home › Forums › Calendar Products › Events Calendar PRO › Can I have a header image on the photo view, but not on the individual listings?
- This topic has 8 replies, 3 voices, and was last updated 9 years, 6 months ago by
Sarah Kerr.
-
AuthorPosts
-
September 28, 2016 at 5:30 pm #1170154
Sarah Kerr
ParticipantI want a header photo at the top of the page with all the thumbnails, but not at the top of the page when you open each listing. Is that possible?
Thanks,
SarahSeptember 29, 2016 at 7:20 am #1170352George
ParticipantHey Sarah,
Thanks for reaching out!
Header photos are not a feature of our plugins, so unfortunately the only ways you could do what you describe here are by way of your theme or by way of some custom coding.
We unfortunately cannot help with custom coding, but there are few things I can think of recommending that might help you get started:
1. Head to Events → Settings → Display in your site’s wp-admin and find the “Events template” option. Try out every single template option available: save an option, then check on your events pages. Does any template seem to have a better “header” in place? If your theme offers header-image support, you may be able to find a template that will allow you to specify a header image.
2. If nothing from within your theme helps here, then I would recommend checking out our Themer’s Guide, which covers the basics of making template files: https://theeventscalendar.com/knowledgebase/themers-guide/
☝️ You can use the methods in the Themer’s Guide to make a customized version of the Photo View that has header images.
Sorry to disappoint, Sarah!
GeorgeOctober 5, 2016 at 11:12 am #1172861Sarah Kerr
ParticipantHi there,
I created a new default page template for the events page templates and set it up in our theme file in it’s own file titled (tribe-events) titled ‘default-template.php’ as you have written in your documentation. It’s working great and is allowing us to have a feature image at the top of all of our event pages. However, we only want to use that page template on the event listing page and not the individual event pages. Is it possible to set up a page template in the (tribe-events) folder that will only apply to the event listing page?
October 5, 2016 at 8:56 pm #1173061George
ParticipantGlad to hear it, Sarah. When it comes to limiting aspects of the template changes to only List View or other specific views, you should be able to do this with conditional statements like the ones listed here.
I’d recommend tinkering with those conditionals.
So, something like this:
if ( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) {
// put the featured image code here between the { } brackets. this stuff between
// those brackets will only run on list view pages
}
I hope it helps!
GeorgeOctober 6, 2016 at 12:45 pm #1173456Sarah Kerr
ParticipantHi George, I tried the code you sent. Thank you. It’s not working for me yet. Can you see if anything here is wrong?
if ( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) {
add_action( ‘genesis_after_header’, ‘events_feature_widget_area’ );
function events_feature_widget_area() {genesis_widget_area( ‘events-feature’, array(
‘before’ => ‘<div class=”events-feature widget-area”><div class=”wrap”>’,
‘after’ => ‘</div></div>’,
) );}
}October 6, 2016 at 6:14 pm #1173520George
ParticipantThis reply is private.
October 6, 2016 at 7:26 pm #1173538Sarah Kerr
ParticipantThat code worked! Thanks so much for your help!
October 6, 2016 at 7:32 pm #1173541George
Participant😀
-
AuthorPosts
- The topic ‘Can I have a header image on the photo view, but not on the individual listings?’ is closed to new replies.
