Home › Forums › Calendar Products › Events Calendar PRO › Exclude Events / Categories from Upcoming Events Widget
- This topic has 7 replies, 2 voices, and was last updated 10 years, 4 months ago by
Cliff.
-
AuthorPosts
-
December 6, 2015 at 3:22 am #1036219
Dennis
ParticipantHi guys,
I am using Spiritual Theme and the theme uses your upcoming events widget to show 3 upcoming events on the frontpage, as you can see here: http://www.wann-is-was.de.
Is it possible to exclude specific events or at least events that are part of a certain category?
The developer of the theme said he ist just using a standard function of your plugin and pointed out on this thread: https://theeventscalendar.com/support/forums/topic/exclude-one-category-from-upcoming-events-list/
But even the latest code snippet from that thread doesn’t work for me (http://snippi.com/s/rd9pqcd).
December 7, 2015 at 1:44 pm #1037148Cliff
MemberHi. Here’s a snippet I found that may help you figure things out:
Gist: https://gist.github.com/elimn/c47fb3e65d437c2479bd
Please understand that, per our Scope of Support Terms, we only provide support for the default WordPress themes like Twenty Fifteen. Additionally, we do not provide code customizations, but we try to point customers in the right direction to help them accomplish customizations on their own.
Please let me know how things go for you.
December 8, 2015 at 12:07 pm #1037797Dennis
ParticipantHi Cliff,
thanks for your response. Of course I can understand you don’t provide support for that theme.:)
I have a test installation of a WP 4.3.1 installation with Twenty Fifteen and v4.0 of TEC. But the upcoming events from the category “sport” still show up in the upcoming events widget when I am on the front page. The code has just removed the event from the events list and months view in the calendar. It’s also gone from the upcoming widgets view, but just when I’m in the calendar (/events/).
I put your code into the functions.php of Twenty Fifteen and just added ‘sport’ as category name in line 9.So I think your code example removes a lot more I wanted to. I was just asking for a removal from the default upcoming events widget you provide.
Thanks
December 8, 2015 at 2:56 pm #1037865Cliff
MemberI might be able to help you better if you provide me with a link to each page you WOULD want it hidden on and a screenshot of where it’s appearing on each of those pages (to make sure I’m catching all instances of it).
December 9, 2015 at 11:35 am #1038390Dennis
ParticipantHi Cliff,
it should be removed from the upcoming events widget on every page. Everything can be visible on the events calendar page in list/week/month etc. view. I just want to have selected categories in the upcoming events widget whereever I put it. I use the widget in the footer section of my site for example: http://www.wann-is-was.de.
“Super Bowl 50” and all other entries in the category “american-football” should not be visible.

For the future it would be great to have a checkbox or something like that in the widget. So you can include/exclude categories from being visible in frontend:
December 10, 2015 at 10:08 am #1038988Cliff
MemberThanks for the screenshot. You have the free/core version of The Events Calendar <i>Event List widget</i>.
With the PRO add-on activated, add the Event List widget and you’ll see the category options you’re wanting!
More info here: widgets and shortcodes
Let me know if you need anything else.
December 12, 2015 at 5:54 am #1040004Dennis
ParticipantHi Cliff, thanks. I overlooked that.
I will contact the developer of the theme for the 3 upcoming events on top of the start page. Maybe he can do something about that with the event list widget pro plugin
December 12, 2015 at 6:52 pm #1040292Cliff
MemberGlad to hear you’re getting it sorted out. Have a good one!
-
AuthorPosts
- The topic ‘Exclude Events / Categories from Upcoming Events Widget’ is closed to new replies.
