Custom setup for list view

Home Forums Calendar Products Events Calendar PRO Custom setup for list view

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #46963
    Joshua
    Participant

    Hello, I would like to edit the list.php view so that it would separate events by category. For example, category 1 on top and Category 2 on the bottom. How should I proceed with this?

    #47002
    Stefan
    Participant

    Hi, also would like to be able to do this. Ideally create separate list views by category. In other words link to list of just category 1 entries and link to list of just category 2 entries.

    #47005
    Joshua
    Participant

    Hey Stefan, to do what you’d like you need to set up two page templates with wp_query for pulling in an event category. I don’t remember now, but the forum has a tutorial on this. What I want is a little bit different, I want to divide multiple categories on the same page.

    #47030
    Stefan
    Participant

    Thanks for this Joshua, very appreciated. Will try and find this tutorial. Hope you get some help soon with your query.

    #47134
    Barry
    Member

    Stefan: a list view relating to a specific category already exists, you can reach it using the following pattern of URL:

    example.com/events/category/CATEGORY_SLUG/upcoming/

    So it may be that that will fit your needs without having to build your own queries.

    #47136
    Barry
    Member

    Joshua: what you want is a little more involved. It sounds like you don’t really want to modify the upcoming events list (which simply lists future events chronologically) but rather you want to build a new form of list view where all future events from Category A are listed first, then all future events from Category B, etc.

    I’d imagine that to be fairly involved and would have various complexities relating to pagination and so on.

    So unfortunately we can’t really offer much help on this one, but we can definitely leave this open in case other members of the community can comment and/or if you do arrive at a solution it would be great if you considered posting an update and sharing it 🙂

    Thanks!

    #47140
    Joshua
    Participant

    Hey Barry. I currently have two seperate pages that list upcoming by category. Wouldn’t it be possible to list on one page both sets of events? You can see one category here: http://www.escoladabiblia.com/cursos-de-idiomas/
    Second category here: http://www.escoladabiblia.com/cursos-biblicos/
    I would like to view both in this fashion on one page.

    #47295
    Barry
    Member

    Ahh, I see. You could probably leverage tribe_get_events() to query for and build two separate lists. Here is an example that pulls events from a specific category (using a tax query, just as you would do with WP_Query) and a specific date range.

    The date range elements you could remove – and basically you could tweak it to fit your specific needs.

    Does that help at all here?

    #47308
    Stefan
    Participant

    Thanks Barry, that was exactly what I was after.

    #47344
    Barry
    Member

    Excellent. Joshua – does that give you what you need, too?

    #47348
    Joshua
    Participant

    Hey Barry. I believe so. I’m not learned in PHP so I’ve managed to get things working using trial and error. In this case I may have to get a friend who does to help me. I’ll see if he can use your instructions to get a list.php view that orders upcoming events by category and I need it to display a warning when there are no upcoming events (such as, check back later). thanks.

    #47408
    Barry
    Member

    No problem, I hope your friend can help you out there 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Custom setup for list view’ is closed to new replies.