Support

Home Forums Event Espresso Premium Some Events Do Not Show In Calendar

Some Events Do Not Show In Calendar

Posted: March 20, 2017 at 11:22 am

Viewing 11 reply threads


Stanwick Lakes

March 20, 2017 at 11:22 am

Some of the events do not appear in our Calendar, originally I thought this was events which had multiple days set up for registration, but infact that’s not the case as some of these appear to work. I can’t seem to find a defining difference between what’s showing and what’s missing… any ideas?

I’m implementing it on the page via the widget, I have show expired events set to no (it makes no difference setting to yes) and I have no category restrictions added.

https://www.stanwicklakes.org.uk/whats-on/


Josh

  • Support Staff

March 20, 2017 at 11:38 am

Hi there,

If you place the [ESPRESSO_CALENDAR] shortcode on a page (instead of using the widget) do all of the events appear?


Stanwick Lakes

March 21, 2017 at 4:20 am

Yes they appear, I do want to limit it to one per day as I have now with a view more button, but the ones which were completely missing are now there


Josh

  • Support Staff

March 21, 2017 at 9:20 am

You can use the shortcode with a parameter to achieve limiting the calendar to display one event per day:

[ESPRESSO_CALENDAR max_events_per_day=1]


Stanwick Lakes

March 27, 2017 at 3:16 am

Hi Again,

Unfortuately whilst that works off the page on a blank CMS page, when it’s placed into the category page https://www.stanwicklakes.org.uk/whats-on/ – the same issue is caused.

The plugin has been removed and instead a text shortcode [ESPRESSO_CALENDAR max_events_per_day=1] has been put in it’s place and we still get the same result as we did before.


Josh

  • Support Staff

March 27, 2017 at 12:20 pm

Hi there,

Can you explain what you mean by a category page and how that’s different than a blank CMS page?


Stanwick Lakes

March 28, 2017 at 2:35 am

Sorry I mean the page which lists all the events – it’s added to to the top of the page https://www.stanwicklakes.org.uk/whats-on/ via a shortcode in a text widget in a widget area that pulls into the top area. This causes it not to show the full calendar as expected.

If I add the same shortcode into a blank CMS page then it works as expected.


Tony

  • Support Staff

March 28, 2017 at 7:55 am

Can you post the full shortcodes you are using on that page currently?

Do you have any custom functions hooking into FHEE__EED_Espresso_Calendar__get_calendar_events__query_params? Usually this would be done within functions.php or a custom functions plugin for the site.


Stanwick Lakes

March 29, 2017 at 8:07 am

[ESPRESSO_CALENDAR max_events_per_day=1] is the shortcode I’m using.

We have one file being pulled into our functions.php (developed by a developer who we’re no longer working with )

<?php 
	
add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );	

function espresso_filter_spco_submit_button_text( $submit_button_text, EE_Checkout $checkout ) {
    if ( ! $checkout instanceof EE_Checkout || ! $checkout->current_step instanceof EE_SPCO_Reg_Step || ! $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
        return $submit_button_text;
    }
    
    if ( $checkout->next_step->slug() == 'finalize_registration' ) {
        $submit_button_text = __( 'Complete Registration', 'event_espresso' );
    } else if ( $checkout->current_step->slug() == 'attendee_information' && $checkout->revisit ) {
        $submit_button_text = sprintf( __( 'Welcome back. Proceed to %1$s', 'event_espresso' ), $checkout->next_step->name() );
    } else if ( $checkout->current_step->slug() == 'attendee_information' ) {
        $submit_button_text = sprintf( __( 'Proceed to Payment Options', 'event_espresso' ), $checkout->next_step->name() );
    } else {
        $submit_button_text = sprintf( __( 'Finished with %1$s? Go to %2$s', 'event_espresso' ), $checkout->current_step->name(), $checkout->next_step->name() );
    }
    return $submit_button_text;
}
add_filter( 'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text', 'espresso_filter_spco_submit_button_text', 10, 2 );

//	
// SPACES LEFT SHORTCODE
//
	
	function my_print_tickets_left_after_selector($atts) {
    global $wpdb;

    $EVT_ID = get_the_ID();

    	$x = '<span class="spaces-text">Spaces Left: </span>';

        $sql = "SELECT * ";
        $sql .= "FROM {$wpdb->prefix}esp_datetime ";
        $sql .= "WHERE {$wpdb->prefix}esp_datetime.EVT_ID = %d";
         
        $datetimes = $wpdb->get_results( $wpdb->prepare( $sql, $EVT_ID ));
        
        $remaintotal = 0;

        foreach($datetimes as $datetime){
            $limit = $datetime->DTT_reg_limit;
            $sold = $datetime->DTT_sold;
            $remaintotal += $limit - $sold;
            $remain = $limit == -1 ? '' : $remaintotal;
        }

        $x .= $remain;
 
    return $x;
 
}
add_shortcode('show_capacity','my_print_tickets_left_after_selector');

/**
 * Register our sidebars and widgetized areas.
 *
 */
function ee_widgets_init() {

	register_sidebar( array(
		'name'          => 'EE Calendar sidebar',
		'id'            => 'ee_calendar',
		'before_widget' => '<div>',
		'after_widget'  => '</div>',
		'before_title'  => '<h2 class="rounded">',
		'after_title'   => '</h2>',
	) );

}
add_action( 'widgets_init', 'ee_widgets_init' );

?>
<?php 
	
add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'my_custom_ticket_selector_template_location');

function my_custom_ticket_selector_template_location(){
    return get_stylesheet_directory() . '/eventespresso/templates/ticket_selector_chart.template.php';
}

add_filter( 'FHEE__EED_Event_Archive__template_include__allow_custom_selected_template', '__return_true' );
?>


Tony

  • Support Staff

March 29, 2017 at 8:17 am

[ESPRESSO_CALENDAR max_events_per_day=1] is the shortcode I’m using.

What other shortcodes do you have on the page?


Stanwick Lakes

March 29, 2017 at 8:53 am

We’ve got to the bottom of the issue.


Tony

  • Support Staff

March 29, 2017 at 9:00 am

Great, can you provide any details on what was happening?

Viewing 11 reply threads

The support post ‘Some Events Do Not Show In Calendar’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso