Support » Plugin: Events Manager » Separating online Events from Physical

  • Resolved webfoleo

    (@webfoleo)


    Hiya

    Does anybody know which shortcode I could use to separate ‘online events’ from ‘physical locations’, please? I was hoping to have two columns to make it easy for people to see the physical events which are currently hiding a long way down the page.

    Thank you very much
    Roger

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    You can try to use this custom snippet for a custom conditional placeholder for physical locations

    
    add_action('em_event_output_condition', 'my_em_custom_conditional_event_location', 1, 4);
    function my_em_custom_conditional_event_location($replacement, $condition, $match, $EM_Event){
        if( is_object($EM_Event) && preg_match('/^is_physical_location/',$condition, $matches) ){
            if ( empty($EM_Event->event_location_type) || $EM_Event->event_location_typ == 'location' ){
                $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
            }else{
                $replacement = '';
            }
        }
        return $replacement;
    }
    
    

    e.g.

    
    {is_physical_location}
    #_LOCATIONLINK
    {/is_physical_location}
    

    Thanks

    Thread Starter webfoleo

    (@webfoleo)

    Hi, apologies I have just picked this up. Thank you so much for coming back to me on this. I have added the snippet but I don’t quite understand how to use the code…

    {is_physical_location}
    #_LOCATIONLINK
    {/is_physical_location}

    to separate the two columns. I have looked at the shortcode and am not sure how I can use the [events_list] with the above.

    Thank you so much for your help!
    Roger

    Plugin Support angelo_nwl

    (@angelo_nwl)

    Hello,

    You can try something like

    
    [events_list scope="future" limit=10 pagination=1 format_header="<table>" format_footer="</table>"]
    
    <tr>
     <td>#_EVENTLINK</td>
     <td>
       {is_physical_location} #_LOCATIONLINK {/is_physical_location} 
     </td>
    </tr>
    
    [/events_list]
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Separating online Events from Physical’ is closed to new replies.