• Resolved craigbirch

    (@craigbirch)


    Hello,

    I am trying to use a custom single-event.php template that will show the event details for example #_EVENTNAME etc.

    I can the also use the_content(); function to pull through the content from each event. However it appears these attributes are not working in the PHP template.

    Is there a way for me to make these work in the template to show the correct details for each event? I have used them in the ‘EM_Events’ array to pull get formats but this show all the event names on the details page?

    Alternatively if this is not possible, is there a way to use the_content(); within the ‘Single event page format’ field in settings?

    Any help would be appreciated.

    Thanks,
    Craig

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    just to confirm, did you mean single-event.php in your theme directory? if yes, you can try something like this

    
    <?php get_header(); ?>
    
    <?php
    			global $post;
    
    			$EM_Event = em_get_event($post->ID, 'post_id');
    
    		?>
    
      
    <div class="container" style="padding-top:10px;">
        <div class="row-fluid"> 
    
        <div class="span8">
    		
    
    		
    		<h1 class="single"><?php echo $EM_Event->output('#_EVENTNAME'); ?></h1>
    		<div class="blockhead">                          
                                  <p> 
                                   
                                     <?php $startdate = $EM_Event->event_start_date;?>
                                     Datum : <?php echo $EM_Event->output('#_EVENTDATES');?>, <?php echo $EM_Event->output('#_EVENTTIMES');;?><br/>
                                     Locatie : <?php echo $EM_Event->location->location_name;?><br/>
                                     Adres : <?php echo $EM_Event->location->location_address;?>, <?php echo $EM_Event->location->location_town;?>
                                  </p>
                    </div>   
    
    		<div class="entry">
    		 <?php echo $EM_Event->post_content; ?>
    		</div>
    
    	</div>
    	<div class="span4">
    		<?php echo $EM_Event->output('#_BOOKINGFORM'); ?>
    	</div>
    </div>
    </div>
    <?php get_footer(); ?>
    
    Thread Starter craigbirch

    (@craigbirch)

    That is what I was referring to and it appears to be working perfectly.

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Single format template (single-event.php)’ is closed to new replies.