• Resolved msthunder1

    (@msthunder1)


    Hi,

    i’m creating a custom format for list of events. Basically i’m creating a custom list when someone click on a calendar.

    Specifically, its the “event_list_item_format.php”, which at the moment contains the following code:

    <tr>
    	<td>
    		#_EVENTDATES<br/>
    		#_EVENTTIMES
    	</td>
    	<td>
    		#_EVENTLINK
    	</td>
    </tr>

    The template works, however, i don’t want to use placeholders in my php file (f.ex. “#_EVENTTIMES” ). I want to solver everything with php, but i don’t know how, as $post returns me the page and $EM_Event is undefined.

    I’m trying to get the event id in this loop with PHP, but without success, as the placeholder #_EVENTID returns a string, which is replaced later iwht he actual id.

    How could i grab the id of the event at this point?

    Or, i was to edit the events-list.php directly, how would i go about to create the loop with the passed arguments?

    echo EM_Events::output( $args );

    https://www.ads-software.com/plugins/events-manager/

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

    (@angelo_nwl)

    sorry I’m afraid that we are quite limited with regards to custom coding as per the support policy – https://eventsmanagerpro.com/support-policy/

    however you can try something like this

    
    $EM_Events = EM_Events::get(array('limit'=>$maxEventsDisplayed, 'orderby'=>'start_date'));
    foreach ( $EM_Events as $EM_Event ) {
     echo $EM_Event->event_id;
    }
    

    for reference: classes/em-event.php

Viewing 1 replies (of 1 total)
  • The topic ‘Custom php formats for list of events’ is closed to new replies.