Title: thinib's Replies | WordPress.org

---

# thinib

  [  ](https://wordpress.org/support/users/thinib/)

 *   [Profile](https://wordpress.org/support/users/thinib/)
 *   [Topics Started](https://wordpress.org/support/users/thinib/topics/)
 *   [Replies Created](https://wordpress.org/support/users/thinib/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/thinib/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/thinib/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/thinib/engagements/)
 *   [Favorites](https://wordpress.org/support/users/thinib/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/users/thinib/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/thinib/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events disappears](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [10 years ago](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/#post-7359060)
 * It worked fine previously – I think something has changed in the upgrades with
   Events Manager
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events disappears](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [10 years ago](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/#post-7359059)
 * Trying again:
 *     ```
       add_action('em_event_output_condition', 'my_em_styles_event_output_condition', 1, 4);
       function my_em_styles_event_output_condition($replacement, $condition, $match, $EM_Event){
             if( is_object($EM_Event) && preg_match('/^is_newpost$/',$condition, $matches) ){
               if( strtotime($EM_Event->event_modified) >= strtotime("-3 days", current_time('timestamp'))){
                   $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
               }else{
                   $replacement = '';
               }
           }
           return $replacement;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events disappears](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [10 years ago](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/#post-7359058)
 * Sorry, my mistake. I think the top part of the code is for a scope function that
   does work. It’s this part that isn’t working:
 * `add_action(’em_event_output_condition’, ‘my_em_styles_event_output_condition’,
   1, 4);
    function my_em_styles_event_output_condition($replacement, $condition,
   $match, $EM_Event){ if( is_object($EM_Event) && preg_match(‘/^is_newpost$/’,$
   condition, $matches) ){ if( strtotime($EM_Event->event_modified) >= strtotime(“-
   3 days”, current_time(‘timestamp’))){ $replacement = preg_replace(“/\{\/?$condition\}/”,”,
   $match); }else{ $replacement = ”; } } return $replacement; }
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events disappears](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [10 years ago](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/#post-7359050)
 * Hi Caimin,
 * I’m not sure how to display the output from that feed (the url is gleanreport.
   com), but when I put {is_newpost}**\*NEW\***{/is_newpost} in Default event list
   format I used to get a display for new posts, now I’m getting nothing.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events disappears](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [10 years ago](https://wordpress.org/support/topic/rss-feed-for-new-events-disappears/#post-7358941)
 * Sorry I’ll try to put the code in backticks now:
 *     ```
       add_filter( 'em_get_scopes','my_em_scopes',1,1);
       function my_em_scopes($scopes){
       	$my_scopes = array(
       		'newposts' => 'New Posts'
       	);
       	return $scopes + $my_scopes;
       }
   
       add_action('em_event_output_condition', 'my_em_styles_event_output_condition', 1, 4);
       function my_em_styles_event_output_condition($replacement, $condition, $match, $EM_Event){
             if( is_object($EM_Event) && preg_match('/^is_newpost$/',$condition, $matches) ){
               if( strtotime($EM_Event->event_modified) >= strtotime("-3 days", current_time('timestamp'))){
                   $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
               }else{
                   $replacement = '';
               }
           }
           return $replacement;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/page/2/#post-4519856)
 * Duh, that’s because the scope works with event_date_created, but the conditional
   placeholder using $EM_Event->event_date_created does not. Here is my code for
   the scope which works:
 *     ```
       add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2);
       function my_em_scope_conditions($conditions, $args){
               if( !empty($args['scope']) && $args['scope']=='newposts' ){
                       $start_date = date('Y-m-d',strtotime("-2 days", current_time('timestamp')));
                       $conditions['scope'] = " ( event_date_created >= '$start_date') ";
               }
               return $conditions;
       }
   
       add_filter( 'em_get_scopes','my_em_scopes',1,1);
       function my_em_scopes($scopes){
       	$my_scopes = array(
       		'newposts' => 'New Posts'
       	);
       	return $scopes + $my_scopes;
       }
       ```
   
 * But the code below only works with $EM_Event->event_modified, not $EM_Event->
   event_date_created
 *     ```
       add_action('em_event_output_condition', 'my_em_styles_event_output_condition', 1, 4);
       function my_em_styles_event_output_condition($replacement, $condition, $match, $EM_Event){
             if( is_object($EM_Event) && preg_match('/^is_newpost$/',$condition, $matches) ){
               if( strtotime($EM_Event->event_modified) >= strtotime("-2 days", current_time('timestamp'))){
                   $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
               }else{
                   $replacement = '';
               }
           }
           return $replacement;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/page/2/#post-4519855)
 * It seems that $EM_Event->event_date_created works in the code when I use shortcode,
   such as [events_list scope=’newposts’], but not when I use a conditional placeholder,
   such as {is_newpost}*NEW*{/is_newpost}. However $EM_Event->date_modified works
   for both. Can’t work out why! Any ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/page/2/#post-4519839)
 * I have tried that, no good. I’m currently using $EM_Event->date_modified which
   gives me something close, but includes events that have been modified recently,
   not just created.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP FullCalendar] Integration of calendar with event manager search form](https://wordpress.org/support/topic/integration-of-calendar-with-event-manager-search-form/)
 *  [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/integration-of-calendar-with-event-manager-search-form/#post-4036063)
 * Angelo,
 * I’m using Events Manager with WP Full Calendar, and the EM search form is not
   working (it works fine when WP Full Calendar is deactivated).
 * Are you saying I can’t make it work without creating some custom code?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/page/2/#post-4519837)
 * Angelo,
 * Is there anyway to extract the date the event is created for each event? I think
   I can get this code to work if I know how to do that.
 * I’ve tried various ways, Caiman suggested $EM_Event->created, but this doesn’t
   work. I’ve also tried: $EM_Event->event_date_created, $EM_Event->date_created
   etc
 * Any suggestions?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/page/2/#post-4519833)
 * Thanks Angelo – that was really helpful!
 * I’ve changed the scope to use that php condition too, so I feel like I’m very
   close now, but the conditional placeholder is still not quite working. So far
   I have this, can you see if I’ve made some glaring error:
 *     ```
       add_action('em_event_output_condition', 'my_em_styles_event_output_condition', 1, 4);
       function my_em_styles_event_output_condition($replacement, $condition, $match, $EM_Event){
       	if( is_object($EM_Event) && preg_match('/^is_newpost$/',$condition, $matches) ){
                       $start_date = date('Y-m-d',strtotime("-3 days", current_time('timestamp')));
       		if (event_date_created > '$start_date'){
       			$replacement = preg_replace("/\{\/?$condition\}/", '', $match);
       		}else{
       			$replacement = '';
       		}
       	}
       	return $replacement;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/#post-4519829)
 * For example, I’ve tried to create the following, but wondering if there are other
   snippets of similar coding I could look at as this doesn’t work?
 *     ```
       add_action('em_event_output_condition', 'my_em_styles_event_output_condition', 1, 4);
       function my_em_styles_event_output_condition($replacement, $condition, $match, $EM_Event){
       	if( is_object($EM_Event) && preg_match('//^is_newposts$//',$condition, $matches) ){
       		if( in_array('scope'=>'newposts') ){
       			$replacement = preg_replace("/\{\/?$condition\}/", '', $match);
       		}else{
       			$replacement = '';
       		}
       	}
       	return $replacement;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/#post-4519828)
 * One more question – now that I have this working as a custom scope, can I use
   it to create a conditional placeholder?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/#post-4519824)
 * I got it! I used event_date_created instead of event_creation_date and it now
   works.
 * Thanks for all your help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] RSS feed for new events only](https://wordpress.org/support/topic/rss-feed-for-new-events-only/)
 *  Thread Starter [thinib](https://wordpress.org/support/users/thinib/)
 * (@thinib)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/rss-feed-for-new-events-only/#post-4519821)
 * Thanks Angelo,
 * I’m still working on this.
 * Can you tell me, would this code work for event_creation_date or event_modification_date
   rather than event_start_date or event_end_date?

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/users/thinib/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/thinib/replies/page/2/?output_format=md)