Home › Forums › Calendar Products › Events Calendar PRO › Edit list view for venue and events
- This topic has 7 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
March 5, 2012 at 12:13 pm #16225
Ken
ParticipantI am trying to list only the phone and address in venue list view. I removed the venue section from the original supplied list.php code because I didn’t want it to appear when viewing the list of events (I just wanted the start time, date and cost viewable).
I have now added it back in so that phone and address appear in venue list mode, but now it not only shows the phone and address but also time, date and cost (which I don’t want) and event list shows the phone and location.
So I guess I need a conditional statement to check if it is a venue list? Is there a function to check this?
March 5, 2012 at 7:04 pm #16246Rob
MemberHey Ken. Good question; I’m not aware of one, but let me see if Jonah is.
March 6, 2012 at 8:40 pm #16330Jonah
ParticipantHey Ken, did you try tribe_is_venue()? https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_is_venue
March 7, 2012 at 8:07 am #16349Ken
ParticipantNope I had tribe_has_venue() LOL thanks for pointing that out.
First I check:
if (tribe_is_venue() )Then the next is:
if (tribe_is_multiday() || !tribe_get_all_day() && !tribe_is_venue())Seems to do the trick.
March 7, 2012 at 9:03 am #16366Ken
ParticipantI noticed a small bug/issue in regards venues.
When you create a new venue and you do not place address information in (lets say you don’t have it yet) there is no problem. using if (tribe_address_exists( get_the_ID() ) ) : nothing is displayed on the front end with that conditional statement.
But lets say that you create a venue and you give it a country (Say U.S.) and then the drop down is populated for State ( and you do not choose a state ) if you update the post US appears in the address area on the frontend using the above code… Like it should.
However if the user wants to go back and edit it so that there is no address again (so that no information appears on the frontend) you cannot de-select the country. Likewise if a state was chosen you cannot deselect a state since that dropdown on the admin side is triggered by the country selection that can’t be deselected.
I know that this is a extremely rare occurance and a workaround would be to create a new venue again. But if there are multiple events linked to the original venue, creating a new venue then having to re-link all the events could be a nightmare. Is there an easier way to “reset” the address info..other than going into the database?
March 8, 2012 at 10:53 am #16453Rob
MemberHey Ken. Could you just reset the address info by going into the actual saved venue entry on the backend (under Events -> Venues), or have I misunderstood here?
March 8, 2012 at 11:13 am #16464Ken
ParticipantOn the back end you can delete the phone & address since those are text fields. But you cannot clear the dropdowns (ie country and state).
If country or state is not set on the initial creation of the venue you are ok, but you can’t reset it after it has be published.
does that make sense? I am barely following along 🙂
July 5, 2015 at 5:00 pm #975915Support 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 ‘Edit list view for venue and events’ is closed to new replies.
