Categories List

Home Forums Calendar Products Events Calendar PRO Categories List

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #879938
    helloodds
    Participant

    Hi there – I’m hoping to have some assistance on showing my categories page in list form, following this snippet: https://theeventscalendar.com/support/documentation/display-categories-in-list-view/.

    I have the code set in my functions.php code and regardless if I have my default view set to Month or List, it shows both my main events page and my categories page in month view. The odd thing is that if I set my default view in the settings to Month, it automatically changes it to List. However, like I said, no matter which setting is set, it shows the grid. I refreshed my permalinks as well. Am I missing a step? I’m using 3.8.1 in WP 4.0.

    On a side note – is there a way I can call the categories list within one of my WP page templates?

    #880581
    Geoff
    Member

    Hi there, Marisa! Thanks for getting in touch. 🙂

    Good question. I just tried using the snippet (by the way, great find!) and it seems to work, so that’s definitely odd if it’s not working on your end.

    That makes me wonder if there is a theme of plugin conflict at play. I see you noted:

    Deactivated all other plugins? Yes
    Switched to a default theme? Yes

    Just to confirm, did you notice any difference when you activated a default WordPress theme (e.g. Twenty Fourteen) and deactivated all other plugins? Did the issue still pop up in those conditions?

    It would also be super helpful if you are able to send a link where I can see the issue. If it helps, you can also provide it as a private reply.

    Cheers!
    Geoff

    #882072
    helloodds
    Participant

    Hi Geoff – thanks a bunch for your response! I actually went a different route since I preferred to output the events in a WP template. I have my list working, but I’ve run into one snag that I’m hoping that someone could help me trouble shoot.

    So I’ve used a query to output all upcoming events in a specific category – Classes. I’ve also created a filter (select menu) to view by category, excluding all but the sub category of Classes. The problem is if there’s an event that has occurred in the past, but placed into one of the categories, it shows in the filter. However, my query only lists upcoming events – so if I select a category that doesn’t have an upcoming event, nothing shows. In other words, my filter is showing all events placed in categories, whereas my query is showing only upcoming events. I’d like for the list to only show the categories with upcoming events. I hope this makes sense.

    Here is my code: http://pastebin.com/jUZDNtSq

    I feel I am close and am missing something small, but just can’t figure out how to make the connection. Any help would be greatly appreciated.

    Thanks!

    #882432
    Geoff
    Member

    Great work! You’re definitely digging deep and doing an awesome job so far. 🙂

    We can’t help too much with custom development questions, I’m afraid. However, looking at your code, I wonder if having two event queries on the page are causing some of the overlap. You may need to reset between queries. Or possibly set ‘eventDisplay‘ to ‘custom‘ instead. Here is more detailed information on working with tribe_get_events() that provides some examples of how that might work.

    I hope this helps and good luck!

    Geoff

    #882646
    helloodds
    Participant

    Thanks Geoff – I did indeed forget to reset the query! Thanks for pointing that out. I’ve added it in, but it didn’t effect any of the filter output.

    So, can filtering tribe_events_cat be used with the eventDisplay call? I tried the adding eventDisplay=>upcoming in as part of an array, but it doesn’t seem to effect anything. The drop down still shows categories that have events which only appear in the past (outputting no results). I understand that you can’t help with custom dev questions, so if you can’t answer, that’s fine. Perhaps someone else in the forum is able to point me in the right place. Thanks again for your reply and willingness to point me in a direction.

    #883241
    Geoff
    Member

    I wonder if you could get away with using get_categories() instead and setting the “hide_empty” parameter to 1.

    I’ll leave this thread open a while longer to see if any other thoughts or ideas pop in. We’d also love it if you share the solution when you find it. 🙂

    Cheers!
    Geoff

    #885076
    helloodds
    Participant

    Thanks, Geoff. Unfortunately that didn’t work out either. Thanks for your help though.

    #885184
    Geoff
    Member

     

    Shoot, sorry that didn’t seem to do the trick. I’ll continue to leave this thread open a while longer for you.

    Cheers!
    Geoff

    #897214
    Geoff
    Member

    Hey there, Marisa! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to open a new thread. We’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Categories List’ is closed to new replies.