Trouble with PRO templates

Home Forums Calendar Products Events Calendar PRO Trouble with PRO templates

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #60617
    Anderson
    Participant

    I have upgraded to 3.0 and am having trouble figuring out a couple of things despite the documentation. I’m using “Photo” as my default setting and have figured out where photo.php and all of the additional files within /photo/ display as parts of the events display page.

    1. Default ALL EVENTS view (photo): I need to place something below header.php and above the top event search bar. In which file can this be done?

    2. SINGLE EVENT view: I need to put the event info in a container div, as it’s currently too wide within my theme.

    3. I also need to edit the contents of the single event view (specifically the size of the event photo which is too large). Where can I do this?

    Thanks for any assistance!

    #60745
    Rob
    Member

    Hey Anderson. Thanks for the note here, and for your upgrade to 3.0! Happy to help you out here best I can. On these points:

    1. If I’m understanding your issue correctly, you should be able to do this with a template override of the photo.php file in the PRO “Views” folder. You’d override this template in your own theme by creating a file at [your-theme]/tribe-events/photo.php.
    2. Would creating your own custom single-event.php view accomplish this? Do you know where the div would need to be added? If so, it’s a process very similar to that which I answered in #1. Except keep in mind: single-event.php is a view in the core The Events Calendar, rather than PRO.
    3. You’re speaking of the featured image here, right? Rather than an image placed in the body of the event? If so, this thread and the solution therein should point you in the right direction: https://theeventscalendar.com/support/forums/topic/change-the-featured-image-size-in-template/.

    Hope that helps. Let me know what else I can do after reviewing this and I’ll follow-up as needed. Cheers.

    #61050
    Anderson
    Participant

    This information is helpful and I have gotten closer, but am still experiencing a problem.

    #1: This was successful once I moved “photo.php” into the “pro” folder where my stylesheet lives. Putting it at the location noted above wasn’t working, but moving it into [your-theme]/tribe-events/pro/photo.php works like a charm. This wasn’t clear in the instructions.
    #2: Thanks for pointing me to “The Events Calendar” for the view file. Worked great.

    #3: This is where I’m still having problems. I have located the function referred to in the forum post you shared, located on line54 of single-event.php. However, I’m having no luck changing it. When I add a size into the code the image disappears entirely. Here is what I’ve tried so far:

    (custom size set up in functions.php)

    Thanks for your assistance!

    #61051
    Anderson
    Participant

    The code I added for #3 isn’t displaying. Let me try that again. I have tried each of these and they just made the image disappear.

    (custom size set up in functions.php)

    #61052
    Anderson
    Participant

    Sorry, going to leave out the php echo tag this time (wrapping in didn't work)

    tribe_event_featured_image('thumbnail');
    tribe_event_featured_image('medium');
    tribe_event_featured_image('event-image'); (custom size set up in functions.php)

    #61053
    Anderson
    Participant

    Sorry for the messy posts but hopefully you get the idea : ) Thanks for your help

    #62871
    Barry
    Member

    Hi Anderson, no worries – the forum doesn’t handle code very nicely (our bad!) and that’s something we will hopefully rectify sometime soon. For any other threads you might create though it’s worth considering services like Pastebin or Gist in order to easily share code 🙂

    When using tribe_event_featured_image() you need to specify the post ID before the size. Within the context of the single-event.php template you don’t need to do anything clever to figure out what the post ID is, you can let The Events Calendar figure it out just by doing this:

    echo tribe_event_featured_image(null, 'thumbnail');

    Does that help?

    #980344
    Support Droid
    Keymaster

    This 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Trouble with PRO templates’ is closed to new replies.