AJD
Forum Replies Created
-
Sorry, maybe I wasn’t clear. I’m not looking to display a list of categories, but a list of events that are in a category and are grouped by date.
- This reply was modified 1 year, 5 months ago by AJD.
Interesting, I thought the conditional p-placeholder was dependent on a defined attribute, but it looks like it will work with any conditional. I added it to my other conditional placeholders like this and it is working:
function custom_conditional_placeholder($replacement, $condition, $match, $EM_Event){ if (is_object($EM_Event)) { switch ($condition) { // custom {has_member_image} case 'has_member_image': $userid = $EM_Event->post_author; if (get_field('custom_user_avatar', 'user_' . $userid)) $replacement = preg_replace('/\{\/?has_member_image\}/', '', $match); else $replacement = ''; break; // #_ATT{has_display_dates} case 'has_display_dates': if (is_array($EM_Event->event_attributes) && !empty($EM_Event->event_attributes['Event Display Dates'])) $replacement = preg_replace('/\{\/?has_display_dates\}/', '', $match); else $replacement = ''; break; } } return $replacement; } add_filter('em_event_output_condition', 'custom_conditional_placeholder', 10, 4);
Hi, I am using a bunch of custom conditional placeholders already for event attributes:
But I do see the possibility of outputting the image and its wrapping code instead of just the image.
A follow up question, if I need to create a custom conditional placeholder for this custom attribute, is that possible? The usual way of creating custom conditional placeholders seems to be dependent on custom attributes created within the Events settings…
Thank you, the ACF field is using image ID and I got it working like this:
add_filter('em_event_output_placeholder','efti_em_photo_placeholders',10, 3); function efti_em_photo_placeholders($replace, $EM_Event, $result){ if( $result == '#_MEMBERPHOTO' ){ $replace = ""; $userid = $EM_Event->post_author; if ($userid && $userid > 0) { $imageID = get_field('custom_user_avatar', 'user_' . $userid); if( $imageID ) { $replace=wp_get_attachment_image($imageID, 'large' ); } else {$replace='NO';} ; } } return $replace; }
Can’t delete extra submission…
- This reply was modified 1 year, 7 months ago by AJD.
I am trying to make a simple version that just outputs the user ID, however the code below is throwing an error: Uncaught ArgumentCountError: Too few arguments to function , 2 passed and exactly 3 expected:
add_filter('em_event_output_placeholder','efti_em_photo_placeholders',10, 2); function efti_em_photo_placeholders($replace, $EM_Event, $result){ if( $result == '#_MEMBERPHOTO' ){ $replace = $EM_Event->post_author ('#_CONTACTID'); } return $replace; }
- This reply was modified 1 year, 7 months ago by AJD.
Hi, this error hasn’t recurred, so maybe it was a theme or plugin conflict. I’ll post back if it happens again.
Thanks.
Thank you.
Hi. I think I figure out the Formats thing. in the /templates/ folder there is /templates/templates/ and /templates/formats/ . So I could override on of the formats files there.
However, in this case I might try a custom placeholder first.
Another quick question: Is there an easy way in Events Manager to get the ID of the user who created an event? In my usage scenario I need to get the ID of the user who created the event and then get the ACF field added to their profile.
- This reply was modified 1 year, 8 months ago by AJD.
Just following up as this may be a bug. The setting for Hidden by default, when set to ‘No’ seems to have no effect. The advanced search form is always hidden.
Hello,
Here is a video:
https://www.awesomescreenshot.com/video/15227406?key=8265936fc5b141aafd8ce152c4df9708
and a screenshot of attempted settings to stop translating any BB editing to French:
- This reply was modified 1 year, 9 months ago by AJD.
Okay, thanks.
I went ahead and disabled the Order Status plugin and the Photo Reviews Status is still not available in bulk update.
Thanks for the reply. I can ask this question in the Premium support.
We are using the Woocommerce Order Status manager plugin and those bulk select options from Photo Reviews aren’t available. The Order Status Manger does have an ‘auto import’ to get status from other plugins but it is not working. (in bulk orders or individual orders)