• Resolved larseneirik

    (@larseneirik)


    GREAT plugin!

    But I miss these 2 functions:

    1. Filtering by keyword
    For my use, it’s critical that I can filter away certain events based on keywords in event-title.
    ex: Not showing events marked “rental”, but showing everything else.

    How could one change today’s code (functions.php perhaps?) to achieve this?
    I’d love to have short-code option like this:
    filter=”out”
    filter_words=”rental, staff”
    – IF I’d put “in” here, all events missing the keywords in their title will not appear

    2. Event ID classes
    I would love to color-code “rental”-events in the grid calendar.

    If we could have unique css-IDs or classes to each event displayed by the plugin, this would be possible.

    Thank you for your reply!

    https://www.ads-software.com/plugins/google-calendar-events/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    Hi there!

    thanks for your feedback and your comments.

    I think the first feature you suggest (filtering by keyword) it’s already built in. In the calendar settings you have a search keywords input. If you add Keywords here, you will filter events. And works with negative keywords too or ‘OR’ conditions

    You can try using these common search operators: https://support.google.com/websearch/answer/2466433?hl=en (except probably those specific to websites).

    You can try with: “-rental -staff” (without quotes) if you want to exclude these terms.

    However, adding these to a shortcode is not so simple. Because of caching it’s unlikely you will have reliable results even if this was implemented. The calendar is queried from Google before the shortcode parses its attributes – which normally alter the appearance of the calendar and other things.

    Alternatively though, you might create different calendars, with different keywords settings and embed those into your posts.

    As for your second idea.

    Google has already the ability to color-code events. But the current api key system doesn’t seem to allow to import this setting. Me and others have plans to make a different ‘client’ for Google which uses Oauth which would allow us to make more things, including using private calendars.

    Color coding from Google would be the way to go as WordPress has no idea what those events are or to which category they belong.

    However, it’s also in the roadmap to improve styling possibilities for the calendars (ok, not specifically events) using the WordPress customizer. In this way people wouldn’t have to touch CSS (although they still could if they want).

    I hope you can work something out with the search query field. Sorry if this is not what you were looking for. Buy you can suggest more features. Also link your site so we can see how you are using the plugin, that would be helpful too.

    Thank you

    Thread Starter larseneirik

    (@larseneirik)

    Hi Fulvio

    Thank you for your swift reply! Amazing.

    1. Filtering

    I’m happy to discover the ability to use negative keywords in feed-settings.
    It worked perfectly!

    Demo: my use of the plugin on dev-server:
    https://mhuset.mediatiger.no/kalender/

    The grid-calendar now shows “utleie” events on Wednesdays (O), but not appearing in sidebar! Perfect

    2. Color

    My idea was to f.ex. show the whole bg of the date-box in grid-calendar in a certain color, IF this date contained an event with “rental”.

    If we could get colors from Google, would something similar to this be possible to achieve?

    3. PS: Capitalize only weekdays, not months

    See my sidebar-widget with grouped-list.
    fredag, 04. sept = weekday, day, month

    I would love to output this text as such:
    Fredag, 04. sept

    BECAUSE: In Norwegian, we dont use capitalized letters for months.

    Any suggestions how to achieve this?

    4. PS: End-time in grid-view?
    How can I add this? I see my events only show start-time, not ending time, in pop-up.

    Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    Hey there,

    1 . great, glad it worked out

    2 . yes I think that would be possible, but you’d have to color code your own events on google first – but anyway it’s a bit early to consider this, sorry

    3 . I think I understood, there’s in the works a new version that has a bit of tweaks in handling month/weekday names as well as switching to a ‘mobile mode’ when the calendar is shrunk for example when on a widget area.

    4 . this is a list of shortcodes you can use to display event details: https://wpdocs.philderksen.com/google-calendar-events/event-builder/conditional-shortcodes/ and https://wpdocs.philderksen.com/google-calendar-events/event-builder/event-information-shortcodes/ perhaps you are looking for end-time or end-date?

    Thread Starter larseneirik

    (@larseneirik)

    Thank you so much

    2. I was thinking to color-code a whole date, ex. sep 1, if that date contained a certain event-title, ex. rental

    3. great!

    4. worked ??

    Excited to see new features to this excellent plugin!

    Eirik

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Customize?? Filter events by keyword id-classes’ is closed to new replies.