hahvensa
Forum Replies Created
-
OK, this is the best I can get, not really working though, maybe some day ??
wp_schedule_event( time(), 'hourly', 'event_end_date' ); add_action( 'event_end_date', 'em_event_ended_email' ); if ( $EM_Event->end <= current_time('timestamp')) { function em_event_ended_email() { $subject = $EM_Event->output('Event has ended', 'raw'); $body = $EM_Event->output(get_option('Your event has ended'), $output_type); $EM_Event->email_send( $subject, $body, $EM_Event->get_contact()->user_email); } } add_filter('event_end_date','em_event_ended_email');
OK, that sounds wise ?? So I need to tie the end date with event save or did I totally misunderstood?
Would it be possible to check daily the events that have passed the end date with wp cron and then launch the email? Something like
if( !wp_next_scheduled( 'event_end_date' ) ) { wp_schedule_event( time(), 'daily', 'event_end_date' ); } add_action( 'event_end_date', 'em_event_ended_email' ); function em_event_ended_email() { $subject = $EM_Event->output('Event has ended', 'raw'); $body = $EM_Event->output(get_option('Your event has ended'), $output_type); $EM_Event->email_send( $subject, $body, $EM_Event->get_contact()->user_email); }
But I’m not sure how to find if the event has passed the end date. Maybe the same way the is_past condition?
if ($scope ='past';)
oh, sorry about the ugly formatting, the last lines should be
'<div class="comments">'.$comments_count->total_comments; echo '</div></div>'; } } ?>
Thanks for help! I didin’t manage to do it like that but I got the right formatting like this
<?php if (class_exists('EM_Events')) { $events = EM_Events::get(array('scope' => 'all' )); foreach($events as $event) { $comments_count = wp_count_comments($event->post_id); echo '<div class="post">'; echo $event->output( '<div class="post-meta">{is_past}<span class="silver" href="">Mennyt</span>{/is_past} {is_current}<span class="green" href="">K?ynniss?</span>{/is_current} {is_future}<span class="green" href="">K?ynniss?</span>{/is_future} #_EVENTDATES</div> <div class="post-entry"> <div class="post-thumbnail"><a href="#_EVENTURL">#_EVENTIMAGE{100, 100}</a></div> <h4><a href="#_EVENTURL">#_EVENTNAME</a></h4> <p>#_EVENTEXCERPT</p><span class="tags">#_EVENTTAGS</span></div>'). '<div class="comments">'.$comments_count->total_comments;'</div>'; echo '</div>'; } } ?>
oh, i’m getting it almost right with the pastebin code ?? the layout/formatting is just messed up
—First Event name,
First Event excerpt– First event comment number
Second event name
Second event excerpt– Second event comment number
Third event name etc.Thanks for help. I used the code above and replaced the
($event -> output(‘#_EVENTPOSTID’));
with
($event -> post_id));I’m getting something with this but it’s not right
https://pastebin.com/CLTXb3TwHmm, tried but i get an error “Object of class stdClass could not be converted to string ” so I guess I’m doing something wrong here and getting an object instead of string??
I also tried $event->post_id and $event->ID but I’m not getting it right. I’m able to output the events without wp_count_comments so something wrong there.
ok, sorry i’m new to this plugin. Can I get events like this https://pastebin.com/hDMfVu8N
and add wp count comments to this array?
What is the right way to get post id for the events?Thanks! yeah, works ??
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Current eventsOkey, it was that simple, i didn’t notice that you can override the default event starting date with the booking cut off date in ticket options.
And I also found out that there’s already a condition is_current so everything works just perfect!
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Current eventsThank! So I guess I need to target events that have passed starting day but not yet ending time.
About the booking cut off day, I’m not sure what’s wrong with my settings but the booking cut-off date doesn’t work if the event has already started because the event date overrides it and closes the booking.
Okey, I found what’s wrong with the custom post type taxonomy filtering. Somehow it’s not working with the “Show only corresponding tags for current category” on. I got it working if I don’t use that. Maybe it has something to do with page reload or just with my taxonomies. I guess there’s no ajax reload opportunity.
But thanks, this is a nice plugin anyways!
Hi! I have the same problem. Search goes to homepage but only if I select all categories and all tags. It creates home url. Should it list all categories and tags together or is it even possible? I use pretty permalinks but it’s the same without them. Can I manually add url that plugin should create when searching all from both? Is there a place for that in the code? I could redirect it to certain page.
Another problem I have, is that custom post type taxonomies won’t work well together. If I select category it says no tags here even there is. Well, maybe it just me. Works well with the basic WP categories and tags.
Do you think this plugin will work with the newest WP 3.5? I tried it and I think it works ?? Great plugin, thank you!
Forum: Plugins
In reply to: [Query Posts] [Plugin: Query Posts] Query today's postThanks, great tip! I will try this.
Oh, GREAT! Perfect, it was that easy and I’ve been trying to make it work the hard way. Thanks a lot!