• Resolved Head Goldfish

    (@shoelaced)


    Hello,

    I have a query for the events in my theme template:

    
        $events = EM_Events::get( $args );
        foreach( $events as $event ){
           ...stuff
           echo $event->output( '#_EVENTLOCATION' );
           ...more stuff
        }
    

    For some reason $event->output( '#_EVENTLOCATION' ) is no longer working in my template files. It used to work and I haven’t changed anything, and all of the other output placeholders are working, it’s only that one. I looked through my backup screenshots and it’s missing in all of them so it seems like it’s been this way for a while and not caused by a recent update. I’m not sure when as a hadn’t noticed until now.

    Did something change in the location placeholder that might be causing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,
    Here it displays the locations that are defined as location type is url.
    So can you make sure you have added url type locations.
    For other location related placeholders please refer https://wp-events-plugin.com/documentation/placeholders/ Location Related Placeholders section.
    Eg:
    echo $event->output( '#_LOCATIONNAME' );

    Thread Starter Head Goldfish

    (@shoelaced)

    Okay….

    I managed to solve it thus:
    echo ( $event->output( '#_EVENTLOCATION' ) ?: ( $event->output( '#_LOCATIONLINK' ) ?: 'Location TBA' ) )

    But if anyone from the plugin’s team sees this, a single placeholder that does this would be super helpful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘$EM_Event->output( ‘#_EVENTLOCATION’ ) not working’ is closed to new replies.