• Resolved borysiuk

    (@borysiuk)


    Hello!
    Maybe anyone had a problem that single-location and single-event pages are displayed using single.php file of your theme (not the plugin’s template)?

Viewing 2 replies - 1 through 2 (of 2 total)
  • We are facing the same issue? did you manage to solve it

    Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    You need to set your Events page to Post under events > settings > pages > event pages > display events as =Posts and then create a new PHP file single-event.php in your theme directory.

    e.g

    
    <?php get_header(); ?>
    <div <?php post_class(); ?>>
    	<article>
    		<div class='post-header'>
    			<h1 class='post-title'><?php the_title(); ?></h1>
    		</div>
    		
    		<div class="post-content">
    			<?php 
    			global $post;
    
    			$EM_Event = em_get_event($post->ID, 'post_id');
    			
    			//display feature image
    			echo   $EM_Event->output('#_EVENTIMAGE');
    			
    			//get only the feature image url 
    			echo $EM_Event->output('#_EVENTIMAGEURL');
    
    			//use something like this 
    			echo  $EM_Event->output('#_EVENTNOTES');
    			
    			//or this; formatting can be set under Events > Settings > Formatting > Events > Single event page format
    			$format   =  get_option ( 'dbem_single_event_format' );
    			echo  $EM_Event->output($format);
    			
    			
    			?>
    			
    		</div>
    		
    	</article>
    	<?php comments_template(); ?>
    </div>
    <?php get_footer(); ?>
    
    • This reply was modified 3 years, 8 months ago by angelo_nwl.
    • This reply was modified 3 years, 8 months ago by angelo_nwl.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom single templates’ is closed to new replies.