Support

Home Forums Event Espresso Premium Date and time on private events Mobile

Date and time on private events Mobile

Posted: November 11, 2019 at 12:11 pm


gmkws

November 11, 2019 at 12:11 pm

You gave me an edit for something similar for the desktop, customer needs the date and time to appear on the mobile version for privet parties.

Thank you,


Josh

  • Support Staff

November 11, 2019 at 1:25 pm

Hi,

Can you explain a bit more and provide some context? I’m not sure whom gave you what exactly.


gmkws

November 11, 2019 at 1:42 pm

The customer would like the date and time to appear on the privet parties on the mobile site. If you look at the the calendar on the desktop version you will see that there is the description and the time of the event. they would like this on the mobile site. I was provided code in another ticket to make this change to privet parties on the desktop site.

You can see this in another ticket i have.

Thank you,


Josh

  • Support Staff

November 11, 2019 at 1:51 pm

May I ask which ticket is the other ticket you have?


gmkws

November 11, 2019 at 2:01 pm

Popup box when hovering on calendar
Posted: September 26, 2019 at 10:04 pm


Josh

  • Support Staff

November 11, 2019 at 3:17 pm

Can you explain exactly what’s being served on what you call the mobile site?

I might assume that you’ve got the Calendar page set up with one shortcode for desktop, and another shortcode for small screen (or mobile) devices. If that’s a correct assumption, what’s the shortcode being used to serve content to the small screen devices?


gmkws

November 11, 2019 at 3:23 pm

This is the code on the home screen, small calendar…
[wonderplugin_cond deviceinclude=”iPhone,iPod,Android”]
[ESPRESSO_EVENTS_TABLE_TEMPLATE show_venues=false]
[/wonderplugin_cond]

[wonderplugin_cond deviceexclude=”iPhone,iPod,Android”]
[ESPRESSO_CALENDAR cal_view=basicWeek]
[/wonderplugin_cond]

From the calendar page…

[wonderplugin_cond deviceinclude=”iPhone,iPod,Android”]
[ESPRESSO_EVENTS]
[/wonderplugin_cond]

[wonderplugin_cond deviceexclude=”iPhone,iPod,Android”]
[ESPRESSO_CALENDAR]
[/wonderplugin_cond]


Josh

  • Support Staff

November 11, 2019 at 3:42 pm

On the home screen, where you have the ESPRESSO_EVENTS_TABLE_TEMPLATE showing a list of events to the mobile devices, that page is showing the dates & times for private events. Is that correct?


gmkws

November 11, 2019 at 3:44 pm

Yes, that is a different code, Tables i think. so they are talking about the calendar page under Register in the top nav.


Josh

  • Support Staff

November 11, 2019 at 5:13 pm

Thanks for letting me know that detail.

So for that page, and where ever else you’re the [ESPRESSO_EVENTS] shortcode, you can add some code to your site so dates are displayed for protected posts.

Here’s the code:

function cork_protected_events_dates( $content ) {
    global $post;
    if ( post_password_required() && is_post_type_archive('espresso_events') ) {
        $content .= '<div class="event-datetimes">';
        $content .= espresso_list_of_event_dates( $post->ID );
        $content .= '</div>';
    }
    return $content;
}
add_filter( 'the_content', 'cork_protected_events_dates', 10 );

You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file.


gmkws

November 11, 2019 at 5:15 pm

i have added code for it to show on the desktop site, will this new code be for the mobile site?


Josh

  • Support Staff

November 11, 2019 at 5:29 pm

The code hooks in to where ever you’re using the [ESPRESSO_EVENTS] shortcode.

In one of your previous replies here, you shared this:

From the calendar page…

[wonderplugin_cond deviceinclude=”iPhone,iPod,Android”]
[ESPRESSO_EVENTS]
[/wonderplugin_cond]

So yes, it will. Please note though, if you’re using the [ESPRESSO_EVENTS] shortcode in other places on your website, the code will also have an effect there too.


gmkws

November 11, 2019 at 5:34 pm

Here is what i have as a plugin for the code for the desktop to show the information,
<?php
/*
Plugin Name: Site plugin for corkandboardstudios.com
Description: Site specific code for corkandboardstudios.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
// Disable email match check for all users
add_filter( ‘EED_WP_Users_SPCO__verify_user_access__perform_email_user_match_check’, ‘__return_false’ );
// Set the EE Calendar to display the ‘normal’ tooltip for password protected events
add_filter( ‘AFEE__EED_Espresso_Calendar__get_calendar_events__public_event_stati’, ‘tw_ee_calendar_no_password_required’, 10, 1);
function tw_ee_calendar_no_password_required( $public_event_stati ) {
add_filter( ‘post_password_required’, ‘__return_false’ );
return $public_event_stati;

}
/* Stop Adding Functions */

Can i add the above code? or is this something different.

Sorry for all the questions just want to make sure i do this correctly.

Thank you,


Josh

  • Support Staff

November 11, 2019 at 5:44 pm

That’s the best place to add more code to your site, in that little plugin you’ve already set up.


gmkws

November 11, 2019 at 5:48 pm

Thank you! This worked, I added it to the existing plugin.

The support post ‘Date and time on private events Mobile’ 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