WordPress.org

Forums

Events Manager
[resolved] Single Location/Event Map Format not excepting Event Related Placeholders (6 posts)

  1. Bradford Nelson
    Member
    Posted 8 months ago #

    Hi,

    I'm trying to add "Event Related Placeholders" such as #_EVENTDATES and #_EVENTTIMES to the "Single Location/Event Map Format".

    The field say below "The format of of the text appearing in the balloon describing the location. This accepts Event Related Placeholders and Location Related Placeholders placeholders." but it is only excepting "Location Related Placeholders".

    Using
    Events Manager Version 5.5.3.1
    Events Manager Pro Version 2.3.8.1

    Event example of issue: http://mpc.lanexdev.com/events/milwaukee-media-hall-of-fame-2014-2/

    Any help would be appreciated!

    https://wordpress.org/plugins/events-manager/

  2. caimin_nwl
    NetWebLogic Support
    Posted 8 months ago #

    Hi,

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

  3. Bradford Nelson
    Member
    Posted 8 months ago #

    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 } ?>
  4. angelo
    NetWebLogic Support
    Posted 8 months ago #

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

  5. Bradford Nelson
    Member
    Posted 8 months ago #

    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."

  6. caimin_nwl
    NetWebLogic Support
    Posted 8 months ago #

    That's a good point - I'll pass it on the development team.

Reply

You must log in to post.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic