Exclude Events / Categories from Upcoming Events Widget

Home Forums Calendar Products Events Calendar PRO Exclude Events / Categories from Upcoming Events Widget

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1036219
    Dennis
    Participant

    Hi 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).

    #1037148
    Cliff
    Member

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

    #1037797
    Dennis
    Participant

    Hi 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

    #1037865
    Cliff
    Member

    I 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).

    #1038390
    Dennis
    Participant

    Hi 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.
    Upcoming Events Widget

    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:

    Upcoming Events Widget

    • This reply was modified 10 years, 4 months ago by Dennis.
    • This reply was modified 10 years, 4 months ago by Dennis.
    #1038988
    Cliff
    Member

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

    #1040004
    Dennis
    Participant

    Hi 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
    Upcoming Events on start page

    #1040292
    Cliff
    Member

    Glad to hear you’re getting it sorted out. Have a good one!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Exclude Events / Categories from Upcoming Events Widget’ is closed to new replies.