• Resolved Klaus Moll

    (@klaus-moll)


    Hello support team,

    I am building a page with the DIVI theme and would also like to create and design the single page with DIVI. How does this work?

    It is always necessary to create a php page as a template.

    Many greetings
    Klaus

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

    (@angelo_nwl)

    Hi,

    You can create custom WP template single-event.php on your theme directory and then set Events > Settings > Pages > Event Pages > Display events as =Post

    <?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');
    			
    			//display booking format
    			echo  $EM_Event->output('#_BOOKINGFORM');
    			
    			//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);
    			
    			$EM_Categories = $EM_Event->get_categories();
    			
    			foreach($EM_Categories as $EM_Category){
    				echo $EM_Category->output('#_CATEGORYNOTES');
    			}
    			
    			?>
    			
    			
    		</div>
    		
    	</article>
    </div>
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Single event page with DIVI’ is closed to new replies.