I just tested this and after adding the code snippet. I can add #_EVENTBPGROUPNAME to the format for the single event and it will display the group name. I’m not sure what you mean when you say it’s not having any effect in your code.
Here’s the code I added to add support for #_EVENTBPGROUPNAME
<?php
add_filter('em_event_output_placeholder', 'my_em_styles_placeholders', 1, 3);
function my_em_styles_placeholders( $replace, $EM_Events, $result ) {
if( preg_match( '/#_EVENTBPGROUPNAME.*/', $result ) && !empty($EM_Event->group_id) && function_exists('groups_get_group') ) {
$group = groups_get_group( array( 'group_id' => $EM_Event->group_id) );
if ( !empty( $group ) ) {
$replace = $group->name;
}
}
return $replace;
}
?>
-
This reply was modified 2 months, 4 weeks ago by joneiseman.