Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Can you post the code / formatting that you’re using? Thanks.

    Thread Starter Bradford

    (@b3nelly)

    Single Location/Event Map Format:

    <strong>#_LOCATIONNAME</strong><br>
    #_LOCATIONADDRESS - #_LOCATIONTOWN<br>
    #_EVENTDATES<br>
    #_EVENTTIMES

    event-single.php template override:

    <?php
    global $EM_Event;
    /* @var $EM_Event EM_Event */
    
    <div class="EventMap">
    		<?php echo $EM_Event->output('#_LOCATIONMAP'); ?><BR>
    </div>
    
    <!-- LAYOUT ONE - IF EVENT HAS BOOKING -->
    <?php if (get_post_meta($EM_Event->ID, '_event_rsvp', true) == 1) { ?>
    
    <div class="EventContent">
    <!--<p>
    	<strong>Date/Time</strong><br/>
    		<?php
    			//echo $EM_Event->output('#_EVENTDATES');
    		?><br />
    		<i><?php
    			//echo $EM_Event->output('#_EVENTTIMES');
    		?></i>
    </p>-->
    	<?php echo $EM_Event->output('#_EVENTNOTES'); ?>
    <div class="EventBookingsForm" >
    <h3>Bookings</h3>
    <?php echo $EM_Event->output('#_BOOKINGFORM'); ?>
    </div>
    </div>
    <?php if( have_rows('sponsors') ): ?>
    <div class="EventSponsors">
    <h3 id="EventSponsors" >Event Sponsors</h3>
    <?php
     	$the_sponsors = array();
    	while( have_rows('sponsors') ): the_row();
    		// vars
    		$sponsor_level = get_sub_field('sponsorship_level');
    		$get_sponsor = get_sub_field('select_sponsors');
    		$the_sponsors[$sponsor_level] = $get_sponsor;
    
    	endwhile;
    	//print_r($the_sponsors);
    	foreach( $the_sponsors AS $level=>$sponsors ):
    		echo '<h3 class="SponsorLevel">'.$level.'</h3>';
    		echo '<ul class="SponsorList">';
    		foreach( $sponsors AS $sponsor ):
    			//post vars
    			$sponsor_image = get_post_meta($sponsor->ID, "sponsors_logo", true);
    			$alt_text = get_post_meta($sponsor_image, '_wp_attachment_image_alt', true);
    			$size = "thumbnail"; // (thumbnail, medium, large, full or custom size)
    			$image = wp_get_attachment_image_src( $sponsor_image, $size );
    			$link = get_post_meta($sponsor->ID, "sponsors_site", true);
    			?>
    			<li>
    			<p><a href="<?php echo $link ?>"><img src="<?php echo $image[0]; ?>" alt="<?php if($alt_text){ echo $alt_text; }else{ echo $sponsor->post_title; }?>" /></a></p>
    			</li>
    		<?php
    		endforeach;
    		echo '</ul>';
    		echo '<div class="ClearFix"></div>';
    	endforeach;
    	?>
    </div>
    <?php endif; ?>
    <?php
    }else {
    ?>
    
    <!-- LAYOUT TWO - IF EVENT DOES NOT HAVE BOOKING -->
    
    <div class="EventContent">
    <!--<p>
    	<strong>Date/Time</strong><br/>
    		<?php
    			//echo $EM_Event->output('#_EVENTDATES');
    		?><br />
    		<i><?php
    			//echo $EM_Event->output('#_EVENTTIMES');
    		?></i>
    </p>-->
    	<?php echo $EM_Event->output('#_EVENTNOTES'); ?>
    
    </div>
    <?php if( have_rows('sponsors') ): ?>
    <div class="EventSponsors" >
    <h3 id="EventSponsors" >Event Sponsors</h3>
    <?php
     	$the_sponsors = array();
    	while( have_rows('sponsors') ): the_row();
    		// vars
    		$sponsor_level = get_sub_field('sponsorship_level');
    		$get_sponsor = get_sub_field('select_sponsors');
    		$the_sponsors[$sponsor_level] = $get_sponsor;
    
    	endwhile;
    	//print_r($the_sponsors);
    	foreach( $the_sponsors AS $level=>$sponsors ):
    		echo '<h3 class="SponsorLevel">'.$level.'</h3>';
    		echo '<ul class="SponsorList">';
    		foreach( $sponsors AS $sponsor ):
    			//post vars
    			$sponsor_image = get_post_meta($sponsor->ID, "sponsors_logo", true);
    			$alt_text = get_post_meta($sponsor_image, '_wp_attachment_image_alt', true);
    			$size = "thumbnail"; // (thumbnail, medium, large, full or custom size)
    			$image = wp_get_attachment_image_src( $sponsor_image, $size );
    			$link = get_post_meta($sponsor->ID, "sponsors_site", true);
    			?>
    			<li>
    			<p><a href="<?php echo $link ?>"><img src="<?php echo $image[0]; ?>" alt="<?php if($alt_text){ echo $alt_text; }else{ echo $sponsor->post_title; }?>" /></a></p>
    			</li>
    		<?php
    		endforeach;
    		echo '</ul>';
    		echo '<div class="ClearFix"></div>';
    	endforeach;
    	?>
    </div>
    <?php endif; ?>
    
    <?php } ?>

    Plugin Support angelo_nwl

    (@angelo_nwl)

    am afraid that Single location page format will not accept events related placeholders.

    Thread Starter Bradford

    (@b3nelly)

    If that is the case, you should change the wording below the field.

    “The format of of the text appearing in the balloon describing the location. This accepts Event Related Placeholders and Location Related Placeholders placeholders.”

    That’s a good point – I’ll pass it on the development team.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Single Location/Event Map Format not excepting Event Related Placeholders’ is closed to new replies.