Home › Forums › Calendar Products › Events Calendar PRO › Categories List
- This topic has 8 replies, 2 voices, and was last updated 11 years, 5 months ago by
Geoff.
-
AuthorPosts
-
November 12, 2014 at 9:05 am #879938
helloodds
ParticipantHi 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?
November 12, 2014 at 2:12 pm #880581Geoff
MemberHi 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? YesJust 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!
GeoffNovember 13, 2014 at 7:06 am #882072helloodds
ParticipantHi 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!
November 13, 2014 at 9:06 am #882432Geoff
MemberGreat 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
November 13, 2014 at 10:31 am #882646helloodds
ParticipantThanks 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.
November 13, 2014 at 4:49 pm #883241Geoff
MemberI 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!
GeoffNovember 14, 2014 at 12:25 pm #885076helloodds
ParticipantThanks, Geoff. Unfortunately that didn’t work out either. Thanks for your help though.
November 14, 2014 at 1:20 pm #885184Geoff
MemberShoot, sorry that didn’t seem to do the trick. I’ll continue to leave this thread open a while longer for you.
Cheers!
GeoffNovember 24, 2014 at 10:07 am #897214Geoff
MemberHey 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 -
AuthorPosts
- The topic ‘Categories List’ is closed to new replies.
