Larry
Forum Replies Created
-
In the setup for each event type you can set the text and background color for events of that type. Is the dark blue background coming from that setting?
Forum: Plugins
In reply to: [EventPrime – Events Calendar, Bookings and Tickets] Date comparisonsCopying and pasting the code above doesn’t work very well. I have created two variations of the “simple list” shortcode. One can limit by nunber of events, the other by number of days. They are available here: https://www.dropbox.com/scl/fi/2x9ao6xejd3ecb9igowis/ep_simple_list_2.txt?rlkey=lirfu10jkyru94bcmgcrp3dj7&dl=0
If you enhance any of these, I’d appreciate you sharing the results with me.
Larry
gregoire1974 originally wrote a new shortcode that creates a text list of events. I am not a php programmer but I was able to make modifications to it to add some features I wanted. I then created another version (with EventPrime support’s help) that can be restricted by number of days. It is available here: https://www.dropbox.com/scl/fi/2x9ao6xejd3ecb9igowis/ep_simple_list_2.txt?rlkey=lirfu10jkyru94bcmgcrp3dj7&st=xain8mat&dl=0
Try it and see if this is what you are looking for. I added it to my website using the wpcode plugin.
Forum: Plugins
In reply to: [EventPrime – Events Calendar, Bookings and Tickets] Hide venue seating typeThat works for me, too! Thank you!
The new code did not remove the “Type: Standing” from my venues. I put this code in the custom css and saved. Flushed all caches. Opened a new browser window for my website and went to the venues list and selected a venue. This is at https://mact.net/venues/ and select any venue.
Here’s an image of a venue with the “Type : Standing” still displayed. https://www.dropbox.com/scl/fi/q2yvz4sk2hgs96vp0c6cy/VenueSeatingType.jpg?rlkey=on6s0w53x60nnerkizfvakjau&st=32yr2v1l&dl=0
- This reply was modified 3 months, 1 week ago by Larry.
I have tried this, too, and it did not work for me either.
You may want to update your documentation to reflect this.
Forum: Plugins
In reply to: [EventPrime – Events Calendar, Bookings and Tickets] Date comparisonsI know it was not an EventPrime issue (and said so in my original question). But thank you for responding anyway. Your support is always great.
What I was attempting to do is modify the “simple list” previously submitted (not by me) and modify it to list events for a limited number of day into the future. For example, I wanted a list of all events that will be happening in the next 2 weeks (14 days). That list should include events that are already started or will start within the selected number of days.
Here’s the code. I hope others find it useful.
/**
- Shortcode: [ep_simple_list_days]
- Displays a simplified list of EventPrime events for a number of days
* - Attributes:
- – type=”” → event type slug (EventPrime taxonomy)
- – limit=14 → number of days to display (must be at least 1)(default = 14)
- – order=”ASC” → sorting order “ASC” or “DESC” (default=”ASC”)
- – date=”true” → display event date (default=true)
- – venue=”true” → display event venue (default=true)
- – organizer=”true” → display organizer (default=true)
*/
function simple_eventprime_list_days( $atts ) {
$atts = shortcode_atts( array( 'type' => 'Run', 'limit' => 14, 'order' => 'ASC', 'date' => 'true', 'venue' => 'true', 'organizer' => 'true', ), $atts ); $args = array( 'post_type' => 'em_event', 'posts_per_page' => -1, 'meta_key' => 'em_start_date_time', 'orderby' => 'meta_value_num', 'order' => $atts['order'], ); if ( ! empty( $atts['type'] ) ) { $args['tax_query'] = array( array( 'taxonomy' => 'em_event_type', 'field' => 'slug', 'terms' => $atts['type'], ), ); } $query = new WP_Query( $args ); $upcoming_events = array(); $past_events = array(); $now = time(); $enddate = time() ; $daylimit = $atts['limit']; $now2 = date_i18n( 'm/d/Y', $now ) ; $enddate2 = date_i18n( 'm/d/Y', $enddate ) ; $enddate3 = ($enddate + ($daylimit*24*60*60)) ; $enddate4 = date_i18n('m/d/Y', $enddate3 ) ; $listing_page = get_page_by_path( 'all-events' ); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); $event_id = get_the_ID(); $eventstart = (int) get_post_meta( $event_id, 'em_start_date_time', true ); $eventend = (int) get_post_meta( $event_id, 'em_end_date_time', true );/* test for events that have ended before today */
if ( $eventend < $now ) {
continue;
}/* test for events that start after the end date of the reporting period */
if ( $eventstart > $enddate3 ) {
continue ;
}$upcoming_events[] = $event_id; } } wp_reset_postdata(); ob_start(); /** * Event list renderer */ $display_events = function ( $event_ids, $title ) use ( $atts, $listing_page ) { if ( empty( $event_ids ) ) { echo '*** No Events ***' ; return; } echo '<h5 style="font-weight:bold;">' . esc_html( $title ) . '</h5>'; echo '<ul class="simple-eventprime-list">'; $count = 0; foreach ( $event_ids as $event_id ) { $event_title = get_the_title( $event_id ); $event_link = $listing_page ? add_query_arg( 'event', $event_id, get_permalink( $listing_page->ID ) ) : get_permalink( $event_id ); echo '<li>'; echo '<strong><a class="simple-eventprime-link" href="' . esc_url($event_link) .'" ><em>' . esc_html( $event_title ) . '</em></a></strong>'; /* Date */ if ( $atts['date'] === 'true' ) { $start = get_post_meta( $event_id, 'em_start_date_time', true ); $end = get_post_meta( $event_id, 'em_end_date_time', true ); if ( $start ) { echo ': ' . date( 'm/d/Y', $start ); } if ( $end ) { echo ' - ' . date( 'm/d/Y', $end ); } } /* Organizer (using EventPrime core function) */ if ( $atts['organizer'] === 'true' && class_exists( 'EventPrime_Basic_Functions' ) ) { $basic = new EventPrime_Basic_Functions(); $organizer_ids = get_post_meta( $event_id, 'em_organizer', true ); $organizers = ! empty( $organizer_ids ) ? $basic->ep_get_event_organizer( $organizer_ids ) : array(); if ( ! empty( $organizers ) && is_array( $organizers ) ) { $links = array(); foreach ( $organizers as $org ) { if ( ! empty( $org->name ) ) { if ( ! empty( $org->url ) ) { $links[] = 'url ) . >' . esc_html( $org->name ) . ''; } else { $links[] = esc_html( $org->name ); } } } if ( ! empty( $links ) ) { echo ' presented by <b>' . implode( ', ', $links ) . '</b>'; } } } /* Venue */ if ( $atts['venue'] === 'true' ) { $venue_terms = get_the_terms( $event_id, 'em_venue' ); if ( $venue_terms && ! is_wp_error( $venue_terms ) ) { echo ' at ' . esc_html( implode( ', ', wp_list_pluck( $venue_terms, 'name' ) ) ); } } echo '</li>'; } echo '</ul>'; }; $display_events( $upcoming_events, 'Upcoming Performances' ); if ( empty( $upcoming_events )) { /* && empty( $past_events ) ) { */ echo '<p class="simple-eventprime-none">No events found.</p>'; } return ob_get_clean();}
add_shortcode( ‘ep_simple_list_days’, ‘simple_eventprime_list_days’ );
I have read that documentation. In fact, that’s where I learned that about using different templates. Unfortunately, no matter which template I specify (1, 2 or 3) it always uses the same template (3, I believe).
Here is the shortcode I am trying to use:
[wpec_show_products_from_category category_slug=”momenttime” template=”2″ sort_by=”title” sort_order=”ASC”]
Forum: Plugins
In reply to: [EventPrime – Events Calendar, Bookings and Tickets] Simple event list updateThat solved the problem. Thank you for your always great support.
Forum: Plugins
In reply to: [EventPrime – Events Calendar, Bookings and Tickets] Simple event list updateThank you for the updated shortcode. I am having a slight issue with it, however. The end date is displaying as one day after the end date set in the event setting. Any ideas as to why this might be?
The original em_simple_list3 that I submitted has the same problem, so it was not introduced by your update. I just can’t understand why the end date is showing one day after the end date set for the event!?!
$start = get_post_meta( $event_id, 'em_start_date_time', true ); $end = get_post_meta( $event_id, 'em_end_date_time', true ); if ( $start ) { echo ': ' . date( 'm/d/Y', $start ); } if ( $end ) { echo ' - ' . date( 'm/d/Y', $end ); }Here’s the link to the page that is showing the issue: https://mn-act.net/ep-events-calendar/upcoming-shows-list/ If you click on one of the events you can see that the end date set for the event is one day earlier than the end date shown in the list.
Have you tried their free import/export plugin. I haven’t used it, but it sounds like it might be a starting point for what you want to do.
I am using the free version. I have no extension installed.
The plain list option shows on the Settings, Frontend Views, Organizers page for me:
I have no idea why it would not be available for you.
On the EventPrime settings page, choose “frontend views”, then the “event” section. About half way down the page is the “Event Image Options” section I have the width set to 300 and the height to auto.
HTH
Sorry … just reread your message and realized you are talking about the row layout. Are you asking about the upcoming events on the organizers (theatres in my case) page? If so, I don’t think I did anything special to set the size. I’m using the “plain list” option rather than the “stacked rows”, primarily because that uses a smaller image. It also doesn’t include as much information.
Larry
Never mind about my above request. I decided that the way it is working (and looking) is just fine. Thanks anyway.