Home › Forums › Calendar Products › Events Calendar PRO › how to format single event page
- This topic has 6 replies, 3 voices, and was last updated 10 years, 6 months ago by
Support Droid.
-
AuthorPosts
-
September 2, 2015 at 10:58 pm #1001530
Kelly
ParticipantHi, I just purchased the pro version and am setting up a calendar. Am trying to customize the format of the single events page.
Specifically, I want to
1) move the text that describes the event to the right of the photo, rather than underneath it
2) standardize the size of the photo that appears in the single event page
See http://kid-museum.org/event/makey-makey-workshop/ for an example.Have read the themer’s guide that talks about customizing a template file but I’m confused. There seems to be more than one file called single-event.php (one in the photo folder and one in week folder) and I’m not sure how exactly to edit. Can you please help? Thanks
September 3, 2015 at 11:08 am #1001705Geoff
MemberHi Kelly and thanks for reaching out! Welcome to the forums. š
You’re absolutely right: there are a number of different files namedĀ single-event.php and I know that can be confusing as heck. Sorry about that.
The good news is that you’re on the right track. A template override is an excellent way to move the elements of the single event post around. The event post is composed of one parent template and a sub-template:
- single-event.php — the parent, located at /plugins/the-events-calendar/src/views/single-event.php
- meta.php — contains the event details, venue information, map and such in the post and is located atĀ /plugins/the-events-calendar/src/views/modules/meta.php
To override the parent template:
- Make a copy of it
- Make a new folder in your theme directory calledĀ tribe-events
- Drop the copiedĀ single-event.php file in that folder
Now that the template in your theme, they can be modified to suit your needs. In this case, you canĀ set the size of the featured image by editing this line:
<?php echo tribe_event_featured_image( $event_id, 'full', false ); ?>Change “full” to some other size option (e.g. large, medium, small).
As far as repositioning the the test next to the image, you can do that with some CSS:
.single-tribe_events .tribe-events-event-image { float: left; padding-right: 15px; }Does this help get you closer to what you’re looking for? Please let me know. š
Geoff
September 4, 2015 at 3:58 pm #1002322Kelly
Participantthat’s helpful – thanks. I was looking in the events-calendar-pro folder and not the events-calendar. All set with adjusting the size of photo
Can you tell me where exactly to add the CSS code?
September 7, 2015 at 8:24 am #1002612Geoff
MemberOh yeah, sure! You can add that directly to your theme’sĀ style.css file or–even better–add a tribe-styles.css file to theĀ tribe-events folder you created in the theme and add it in there. Here’s some more info on how that works. š
Cheers!
GeoffSeptember 10, 2015 at 8:41 pm #1004068Kelly
ParticipantHmm…tried that and no change. I’m a bit confused about which elements are event calendar ones and which are PRO ones. Tried adding a .css file to both. Any good resources I can look at that are more basic than your themer’s guide?
September 11, 2015 at 7:56 am #1004246Geoff
MemberOh shoot, sorry about that! We do indeed have a more advanced tutorial on how to use DevTools to target CSS classes.
Any and all styles can go into theĀ tribe-styles.cssĀ file that goes in the top level of the Ā tribe-events folder you added to the theme. And, if worse comes to worse, you can add those styles directly to your theme’s stylesheet and that will have the same effect. š
Did you have any other questions about customizing the page template that I can help with?
Cheers!
GeoffSeptember 26, 2015 at 7:05 am #1008924Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘how to format single event page’ is closed to new replies.
