WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] How to change the display of #_ATTENDEESPENDINGLIST (2 posts)

  1. FrederikRS
    Member
    Posted 11 months ago #

    Hello,

    When I use the "#_ATTENDEESPENDINGLIST" code in the template settings, the attendees are shown as a list with dots.

    Is it possible to change those dots to numbers? So it will look like:

    01. Name 1
    02. Name 2
    03. Name 3
    and so on....

    I hope you are able to answer my question.

    Best regards
    Frederik

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

  2. FrederikRS
    Member
    Posted 11 months ago #

    I found the solution.

    I changed the code in the file /events-manager/templates/placeholders/attendeespendinglist.php

    from:

    <?php
    /* @var $EM_Event EM_Event */
    $people = array();
    $EM_Bookings = $EM_Event->get_bookings();
    if( count($EM_Bookings->bookings) > 0 ){
    	?>
    	<ul class="event-attendees">
    	<?php
    	$guest_bookings = get_option('dbem_bookings_registration_disable');
    	$guest_booking_user = get_option('dbem_bookings_registration_user');
    	foreach( $EM_Bookings as $EM_Booking){
    		if($EM_Booking->status == 0 && !in_array($EM_Booking->get_person()->ID, $people) ){
    			$people[] = $EM_Booking->get_person()->ID;
    			echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
    		}elseif($EM_Booking->status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    			echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
    		}
    	}
    	?>
    	</ul>
    	<?php
    }

    To:

    <?php
    /* @var $EM_Event EM_Event */
    $people = array();
    $EM_Bookings = $EM_Event->get_bookings();
    if( count($EM_Bookings->bookings) > 0 ){
    	?>
    	<ol class="event-attendees">
    	<?php
    	$guest_bookings = get_option('dbem_bookings_registration_disable');
    	$guest_booking_user = get_option('dbem_bookings_registration_user');
    	foreach( $EM_Bookings as $EM_Booking){
    		if($EM_Booking->status == 0 && !in_array($EM_Booking->get_person()->ID, $people) ){
    			$people[] = $EM_Booking->get_person()->ID;
    			echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
    		}elseif($EM_Booking->status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    			echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
    		}
    	}
    	?>
    	</ol>
    	<?php
    }

Reply

You must log in to post.

About this Plugin

About this Topic