Cross-selling or cross-referencing of events

Home Forums Welcome! Pre-Sales Questions Cross-selling or cross-referencing of events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1038030
    Nickolas
    Participant

    Greetings

    My project doesn’t have or need “ticket” capabilities, but I would like to be able have some sort of “You might also like…” section when viewing an activity details.

    It could get the activities in the same category and/or same venues and/or same title (in my scenario, some events are there more then once, at different datetime but sometime also at different venues)… That way, if a visitor cannot attend an event, he could see other datetime where he could attend an event, or be proposed with other similar or of same interest events.

    Any ideas on how this could be achieved?

    Best regards

    #1038443
    Leah
    Member

    Hi again Nickolas!

    Events Calendar PRO has a Related Events feature, which displays similar events at the bottom of your event’s page. Related Events are on by default, and will prioritize displaying events that have the same category and/or tags as the main event page. Since you are doing various instances of the same event at different venues, I think Related Events will work well for your needs.

    Best,

    Leah

    #1043122
    Nickolas
    Participant

    Greetings

    Related Events does sometime show up another recurrence of the same event for another date/venue, but not always, making the process of navigating through a series of event a little hard.
    Ex: we have a series of identical events at different date and different venue. Should the one we were interested in be cancelled or simple is full, it would be beneficial to the user to be suggested other occurrence of that event that are still available.

    Perhaps it should first suggest event with same title, then goes back to its regular “related” query?

    I might resort to coding a little “ul/li” list of “related event” in the case of my recurring events.
    EDIT: Just occurred to me that I cannot resort to that kind of listing and expect linking to other event, since at the point where I can actually generate that list, I don’t have any PostID yet, because those aren’t imported and created as event…
    My best bet would now be to edit my single-event.php template and add a special query for “event with same title” in order to generate such listing… I’ll check that solution out, maybe I’ll find what I’m looking for!

    Regards

    • This reply was modified 10 years, 4 months ago by Nickolas.
    #1043247
    Leah
    Member

    Hiya Nickolas,

    Sounds like you have a good idea to follow up! I can’t provide any additional help for customizing related events here in the Pre-Sales forum, but if you get stuff and want some help please post a thread in our Events Calendar PRO forum and the team there can try to point you in the right direction.

    Cheers,

    Leah

    #1045616
    Nico
    Member

    For future reference (we never know when somebody can run into a similar issue) I’m adding this snippet (to include in single-event.php template file) Nickolas sent us! It will search similar events based on the title content.

    Thanks Nicko 🙂


    'tribe_events',
    'orderby' => 'date',
    'order' => 'ASC',
    's' => $titletext,
    );
    $the_query = new WP_Query( $args );
    // The Loop
    if ( $the_query->have_posts() ) {
    echo '

    Représentations

      ';
      while ( $the_query->have_posts() ) {
      // Get the post
      $the_query->the_post();
      // Get the meta
      $EventStartDate = get_post_meta( get_the_ID(), '_EventStartDate' );
      $EventStatus = get_post_meta( get_the_ID(), '_EventStatus' );
      // Format date
      //$FormattedEventStartDate = date_format(date_create($EventStartDate[0]), 'd F \@ H \h i \m\i\n');
      $FormattedEventStartDate = date_i18n('j F \@ H \h i \m\i\n', strtotime($EventStartDate[0]));
      // Display result
      echo '

    • ' . $FormattedEventStartDate .'' . $EventStatus[0] . '
    • ';
      unset($EventStartDate, $FormattedEventStartDate, $EventStatus);
      }
      echo '

    ';
    } else {
    // no posts found
    }
    /* Restore original Post Data */
    wp_reset_postdata();
    ?>

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Cross-selling or cross-referencing of events’ is closed to new replies.