Changing the Upcoming Events view for single-organizer.php

Home Forums Calendar Products Events Calendar PRO Changing the Upcoming Events view for single-organizer.php

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1023594
    Brent Kozlowski
    Participant

    Hello,

    I would like to change the view and create a custom template, but am not sure what files I need to put in my child theme to make this happen?

    Thanks!

    #1023771
    Geoff
    Keymaster

    Hey there, @bkozlowski!

    Good question. You’re already well on track with the single-organizer.php file. Make a copy of that and then:

    • Make a new folder in your child theme directory called tribe-events
    • Make a new folder in that one called pro
    • Drop the copied single-organizer.php file in that last folder

    Now that the template is in your theme directory, you can modify it to suit your needs. 🙂

    Our themer’s guide is another good resource, if you haven’t seen it yet. It provides the same steps, but breaks it out in much more detail.

    Does this help get you started? Please let me know.

    Cheers!
    Geoff

    #1023865
    Brent Kozlowski
    Participant

    Apologies I should have been more specific. I already have a single-organizer.php in my child theme. I’m trying to modify the events view that appears for a specific organizer. My intention is to only modify the “list view” for the single-organizer and not the “List view” that appears on the main map/calendar page.

    #1023870
    Brent Kozlowski
    Participant

    Apologies I should have been more specific. I already have a single-organizer.php in my child theme. I’m trying to modify the events view that appears for a specific organizer.

    My intention is to only modify the “list view” for the single-organizer and not the “List view” that appears on the main map/calendar page.

    #1023876
    Brent Kozlowski
    Participant

    Ok, I figured out that I need to modify “/list/content.php”, but how do I create a conditional statement that only shows my modified template for just the single-organizer.php and keeps the default list view on the main calendar view? Also, what file would it go in?

    #1023938
    Geoff
    Keymaster

    Ah, gotcha. Thanks for clarifying!

    I would suggest taking this line out from the template:

    echo tribe_organizer_upcoming_events( $organizer_id ); ?>

    …and replacing it with you custom loop. You can even use the list/content.php template as the foundation and modify it from there in the organizer template.

    Does that make sense and will it work for you? Let me know!

    Geoff

    #1023984
    Brent Kozlowski
    Participant

    I think if you gave me an example loop that only pulls the events from that specific organizer I can take it from there. Thanks!

    #1024162
    Geoff
    Keymaster

    Sure! You can actually use the tribe_get_organizer_events() function to grab all events associated with the current venue.

    #1024818
    Brent Kozlowski
    Participant

    I’m so confused now? In your first reply you recommend removing tribe_organizer_upcoming_events and then in the next one you recommend using it?

    I want to make a custom “list layout” that is only used on single-organizer.php while maintaining the default list view for every other page.

    #1024872
    Geoff
    Keymaster

    Sorry for any confusion!

    You can follow the exact same steps that are outlined in my first reply.

    Them, you can remove these lines (65-67 for me) from the single-organizer.php template:

    <?php
    // Use the tribe_events_single_organizer_posts_per_page to filter the number of events to get here.
    echo tribe_organizer_upcoming_events( $organizer_id ); ?>

    From there, you can create a custom list layout. That’s essentially stripping what’s in there now and clearing the canvas for you to create a custom loop.

    Does this help clarify things? Please let me know.

    Thanks!
    Geoff

    #1075582
    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 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Changing the Upcoming Events view for single-organizer.php’ is closed to new replies.