November 9, 2015 at 10:45 pm #1023594
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!November 10, 2015 at 8:23 am #1023771
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.
GeoffNovember 10, 2015 at 11:13 am #1023865
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.
November 10, 2015 at 11:22 am #1023870
- This reply was modified 4 years, 8 months ago by Brent Kozlowski.
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.November 10, 2015 at 11:31 am #1023876
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?November 10, 2015 at 2:11 pm #1023938
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!
GeoffNovember 10, 2015 at 4:27 pm #1023984
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!November 11, 2015 at 6:30 am #1024162
Sure! You can actually use the tribe_get_organizer_events() function to grab all events associated with the current venue.November 12, 2015 at 9:30 am #1024818
I’m so confused now? In your first reply you recommend removing
tribe_organizer_upcoming_eventsand 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.November 12, 2015 at 12:13 pm #1024872
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.
GeoffFebruary 18, 2016 at 8:31 am #1075582Support DroidKeymaster
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.
- The topic ‘Changing the Upcoming Events view for single-organizer.php’ is closed to new replies.