Info request: How can I customize contents of the tribe_events_list shortcode?

Home Forums Calendar Products Events Calendar PRO Info request: How can I customize contents of the tribe_events_list shortcode?

  • This topic has 6 replies, 2 voices, and was last updated 8 years, 2 months ago by seattleadventuresports.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1439992

    By default, the display of the [tribe_events_list] shortcode is a little funny. I’d like to be able to customize it for my client’s site.

    Here’s the full shortcode I’d like to be able to work with.
    [tribe_events_list category=”adventure-day-camps” venue=”yes” city=”yes” phone=”yes” cost=”yes” organizer=”yes”]

    The output looks roughly like this (with a gray date box floated to the left)

    Kids Adventure Day Camp – June 25-29, 2018 [an easily-overlooked black, bold link to the actual event]
    June 25 @ 9:00 am – June 29 @ 4:30 pm
    |
    $359
    Lake Samammish State Park [a bright red link to the venue]
    Organizer: Seattle Adventure Sports [a bright red link to the organizer
    (800) 783-8595

    Request #1: I’d like to be able to add a prominent, visible button that says something like “more info” or “book now” for each event so that users actually know where to click to book the event!!!!

    Request #2: If possible would be nice if I could show the event excerpt as well as that would help users narrow down their choices. (As it stands all identifying information must be carried in the title.) Extra credit if I could show the featured image in thumbnail form as well, but I don’t want to go too wild here.

    Use case: The client runs dozens of events a month for a diverse group of users (pre-school adventure camps, certification programs for EMTs, hiking and kayaking events around the world.) They have separate pages for each type of event and it makes the most sense to use the shortcode on each page to show one category of events.

    Looking at the code it doesn’t look as though there’s a separate template for the list. Instead it looks like it’s all kept in one file, src/functions/template-tags/organizer.php.

    Question #1: Since it doesn’t look like a proper template file can I safely move that to a folder in the child theme so I can override it?
    Question #2: Would it even be smart to move organizer.php? It seems to have a lot of other functionality that could easily be orphaned when you update the plugin.
    Question #3: Is there another way to override the default layout of the tribe_events_list shortcode?

    Thanks!

    #1440297

    Update: I was able to turn the titles into buttons with CSS, and to remove the not-very-helpful gray date box and random separator with display none!.

    Would still like help adding featured images and excerpts plus rearranging the order fields come in.

    #1441933
    Sky
    Keymaster

    Hi David,

    We are limited in the amount of support we can provide for customizations, but I will try to get you pointed in the right direction.

    Request #1: It sounds like you got that sorted with some CSS.

    Request #2: The default list view shows the featured image and excerpt as you are describing. You can see an example on our Calendar Demo page here: https://wpshindig.com/events/list/

    Regarding custom templates. To create a custom template, you need to copy the template into your child theme, not move it. In addition, it seems you are looking in the wrong place for the templates. Please see our Themer’s Guide for instructions on creating custom templates. Once you have copied the template you want to modify into your child theme’s “tribe-events” folder, you can modify it by moving parts around or commenting them out.

    The shortcode will use the same templates as the default events views. To modify the list view, you will want to copy one of the templates from wp-content/plugins/the-events-calendar/src/views/list directory. Most likely, the “single-event.php” template.

    Does this answer your questions? Let me know!

    Thanks,
    Sky

    #1442210

    Hi Sky,

    You’ve answered my questions. Thanks for the pointer to the correct theme file. And documentation. And yes, of course I meant copy not move! 🙂

    Thanks!

    TBH though I stumbled across the ecs shortcode plugin and that gets me about 95% of the results I was looking for.

    #1442702
    Sky
    Keymaster

    David,

    Great, glad I could help!

    Let us know if you have any other questions or issues in the future.

    Take care,
    Sky

    #1462842
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Info request: How can I customize contents of the tribe_events_list shortcode?’ is closed to new replies.