Events Not Showing on Homepage

Home Forums Ticket Products Event Tickets Plus Events Not Showing on Homepage

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #986014
    motherstrust
    Participant

    I recently did a number of plug-in updates including Events Calendar and Woo Tickets. Unfortunately it has knocked a few things out of whack. The most important of which is that the events are no longer showing up on the homepage. Does it have to do with this warning message?

    This was a warning given after updating the plugin:

    Warning: file_get_contents(/home/motherst/public_html/wp-content/plugins/the-events-calendar/src/readme.txt): failed to open stream: No such file or directory in /home/motherst/public_html/wp-content/plugins/the-events-calendar/src/Tribe/Changelog_Reader.phpon line 52

    If so, what can I do to fix this? I tried to find an answer on other forum entries but couldn’t find a clear answer.

    #986042
    Brian
    Member

    Hi,

    Sorry for the issues you are having.

    I took at look at your site and did not get that warning, but I do not see the Events showing in the widget.

    Do you have any custom templates in your theme for the widget?

    With 3.10 we had to make some changes and if you do not update those custom templates the Events will not show.

    In the list-widget.php template you can add these to the top and that might fix the issue instead having to redo custom work:

    $events_label_plural = tribe_get_event_label_plural();

    $posts = tribe_get_list_widget_events();

    Let me know how that works out.

    Cheers

    #986135
    motherstrust
    Participant

    I do not believe we have any custom templates in the theme for the widget…events calendar was part of the theme. I looked at the list-widget.php (see below) but wasn’t clear where exactly you wanted me to drop in this code. Could you please clarify?

    <?php
    /**
    * Events List Widget Template
    * This is the template for the output of the events list widget.
    * All the items are turned on and off through the widget admin.
    * There is currently no default styling, which is needed.
    *
    * This view contains the filters required to create an effective events list widget view.
    *
    * You can recreate an ENTIRELY new events list widget view by doing a template override,
    * and placing a list-widget.php file in a tribe-events/widgets/ directory
    * within your theme directory, which will override the /views/widgets/list-widget.php.
    *
    * You can use any or all filters included in this file or create your own filters in
    * your functions.php. In order to modify or extend a single filter, please see our
    * readme on templates hooks and filters (TO-DO)
    *
    * @return string
    *
    * @package TribeEventsCalendar
    * @since 2.1
    * @author Modern Tribe Inc.
    *
    */
    if ( !defined(‘ABSPATH’) ) { die(‘-1’); }

    //Check if any posts were found
    if ( $posts ) {
    ?>

      <?php
      foreach( $posts as $post ) :
      setup_postdata( $post );
      ?>

      <div class=”<?php if ( is_front_page() ) { echo “medium-4”; } else { echo “large-12″; } ?> columns”>
      <li class=”tribe-events-list-widget-events <?php tribe_events_event_classes() ?>”>

      <?php do_action( ‘tribe_events_list_widget_before_the_event_title’ ); ?>

      “>
      <?php echo rescue_tribe_event_featured_image(null, ‘large’) ?>

      <!– Event Title –>
      <h5 class=”entry-title summary”>
      ” rel=”bookmark”><?php the_title(); ?>
      </h5>

      <?php do_action( ‘tribe_events_list_widget_after_the_event_title’ ); ?>
      <!– Event Time –>

      <?php do_action( ‘tribe_events_list_widget_before_the_meta’ ) ?>

      <div class=”duration”>
      <?php echo tribe_events_event_schedule_details(); ?>
      </div>

      <?php do_action( ‘tribe_events_list_widget_after_the_meta’ ) ?>

      </div>

      <?php
      endforeach;
      ?>

    <!– .hfeed –>

    <p class=”tribe-events-widget-link”>” rel=”bookmark”><?php _e( ‘View All Events’, ‘tribe-events-calendar’ ); ?></p>

    <?php
    //No Events were Found
    } else {
    ?>
    <p><?php _e( ‘There are no upcoming events at this time.’, ‘tribe-events-calendar’ ); ?></p>
    <?php
    }
    ?>

    #986213
    Brian
    Member

    Hi,

    If you do have events templates in your theme that is what I was referring to by custom templates.

    You want to drop the coding in like this:

    if ( !defined(‘ABSPATH’) ) { die(‘-1′); }
    $events_label_plural = tribe_get_event_label_plural();

    $posts = tribe_get_list_widget_events();
    //Check if any posts were found

    Let me know if that helps.

    Thanks

    #987112
    motherstrust
    Participant

    Thank you so much! Resolved!

    #987368
    Brian
    Member

    I am glad to see it fixes this issue.

    Since the issue is resolved I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Events Not Showing on Homepage’ is closed to new replies.