Eugene Zayd
Forum Replies Created
-
First I changed exactly to your code. Nothing happened at all. Then I replaced to
add_filter( 'em_event_output_placeholder', 'my1_em_output_placeholders', 1, 3 ); function my1_em_output_placeholders( $replace, $EM_Event, $result ) { if( preg_match( '/#_EVENTMASTERNAME.*/', $result ) ) { $mastername = get_field( 'eventmastername', $EM_Event->post_id ); $replace = ( ! empty( $mastername ) ) ? $mastername : "Нет ведущего или ведущий - организатор"; } return $replace; }it worked, but showed “No Master Name”.
it sees the field, otherwise it would have output #_EVENTMASTERNAME as string, but
here I meant that if a placeholder is inserted into the template that template cannot recognize, it will output its name as a string
Ok, I understand your point of view about “not specified”, and I’m sure it is specified, because wp_fullcalendar sees this taxonomy, and displays it in the menu, and the menu selection correctly works out according to the taxonomy values assigned in the event. Maybe something is incorrectly configured. Thank you anyway, now I have to deal with ACF
it’s quite strange that the script started working when I changed “my_em_output_placeholders” to “my1_em_output_placeholders”….
Now it shows “No Master Name”, regardless of whether the ACF field is filled in or not. That is, it sees the field, otherwise it would have output #_EVENTMASTERNAME as string, but…almost the same as case above, taking your code as example
add_filter(’em_event_output_placeholder’,’my_em_output_placeholders’,1,3);
function my_em_output_placeholders($replace, $EM_Event, $result){
if( preg_match( ‘/#_EVENTMASTERNAME.*/’, $result ) ) {
$url = get_field(‘eventmastername’, $EM_Event->post_id);
if ( empty( $url ) ) {
$replace = $url;
}
}
return $replace;
}Here! And I inserted it and nothing, no value, no name.
Some kind of magic.
no, not #_EVENTURL, another placeholder, you said you could do any of my placeholders, and #_EVENTURL was just your example. Or not?
Can I see somewhere in the system that this placeholder is defined and has a value?
So, in my case, if I want to repeat the path on this link, I have to create a code, enter it in the Code Snippets and insert a placeholder on the formatting tab, and not pay attention to the template files at all?
(If so, then I made a mistake somewhere, because I have already done it, and I had no errors, no result….%-0)
I know how to use Event Manager tools to make fields using #_ATT.
But I would humbly like to say that the original message from AJD is just about ACF, and I am also asking about ACF.this link is about #_ATT, sorry
I asked about ACF – how to create your own placeholder from the ACF field so that the Event Manager accepts itI try not to make too many similar posts …
Joneiseman , So, if I want to add an ACF field on the event details page, should I change format/event_list_item_format.php ? If so, what exactly should I do to create a placeholder like #_EVENTMASTER (for the speaker, not the organizer/creator of the post)? If I have a taxonomy, should I repeat the process for each of its fields?
Sorry for writing in another user’s topic, but I think the question is appropriate here. joneiseman, as you advised me in another message, it is better to change the code in templates in other folders. And in this case, do we change it directly in the source code? I want to remove a couple of fields from where.php, should I do it right here, or make a copy to another place and change it there?
I’m back! Probably, question not belong to this topic, but… I installed Buddypress – only future events are seen in profile, not all. How can i fix this?
Yes, thank you, this is about my first question. And to the second – i installed Yoast SEO, it added some fields in user’s profile and only one of them, ‘biography’, was added to author’s page. But, unfortunately, i’m still can’t find a place with template for this page. Can you help me with this?
Ok, i just restricted access for those users to admin panel via another addon. Closing case.
in order not to make a second post – how can I get the correct author’s page? This time I go to the event card, click on the author’s name and get a page with the address https://site.name/author/author.name / and on it a message like “can’t find” and a search bar. I would like a description of the author from his profile
A, and list of his events)
No, it was a blank WP and freshly installed addon