• Resolved adechriz

    (@adechriz)


    i create a single-events.php in my theme and put $em_event->output to display custom event content.. when i put this following code i get this error “CALL TO A MEMBER FUNCTION OUTPUT() ON A NON-OBJECT IN…”

    anything wrong? the error message is on conditional event tags.. #_EVENTTAGS thank you..

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    				<div class="single-meta-top">
    
    				<span class="single-subsector">
    				<?php echo $EM_Event->output('{not_recurrence}#_EVENTTAGS{/not_recurrence}'); ?>
    				<?php echo $EM_Event->output('{is_recurrence}#_EVENTCATEGORIES{/is_recurrence}');?>
    				</span>
    
    				<span class="single-date"><?php the_time('d M Y'); ?> </span>
    
    				</div>
    
    				<h1><?php the_title(); ?></h1>
    
    				<?php echo $EM_Event->output('{not_recurrence}
    				<div class="eventmeta">
    
    				<p>by : #_ATT{Organizer}</p>
    				#_EVENTDATES ,
    				#_EVENTTIMES<br/>
    				<p>
    				#_LOCATIONNAME -
    				#_LOCATIONADDRESS -
    				#_LOCATIONTOWN
    				</p>
    				{/not_recurrence}');
    				include 'include/sharrre.php';
    				echo '</div>'; ?>
    
    				<?php echo $EM_Event->output('{is_recurrence}<hr class="garis"></hr>{/is_recurrence}');?>
    			  	<div class="content-post"> <?php the_content(); ?></div>
    
    				<?php endwhile; else: ?>
    					<p><?php _e('Sorry, this page does not exist.'); ?></p>
    				<?php endif; ?>

    http://ww.wp.xz.cn/plugins/events-manager/

Viewing 1 replies (of 1 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    try to use $EM_Event->is_recurrence() instead.

    eg.

    if ( !$EM_Event->is_recurrence() ){
    ...
    }else{
    ..
    }

Viewing 1 replies (of 1 total)

The topic ‘Conditional tags not working’ is closed to new replies.