Edit list view for venue and events

Home Forums Calendar Products Events Calendar PRO Edit list view for venue and events

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #16225
    Ken
    Participant

    I 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?

    #16246
    Rob
    Member

    Hey Ken. Good question; I’m not aware of one, but let me see if Jonah is.

    #16330
    Jonah
    Participant
    #16349
    Ken
    Participant

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

    #16366
    Ken
    Participant

    I 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?

    #16453
    Rob
    Member

    Hey 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?

    #16464
    Ken
    Participant

    On 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 🙂

    #975915
    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 ‘Edit list view for venue and events’ is closed to new replies.