Problem with placeholder
-
Hi.
I need to hide some <section> in the Single Event Page according to the Event Author role.
This is the <section> that i want to hide:
<section class="em-event-type"> <h3>Datos</h3> <div class="em-item-meta-line em-event-time em-event-meta-datetime"> <span class="em-icon-info em-icon"></span>TIPO DE ESPECTACULO: #_ATT{tipo_espectaculo} </div> <div class="em-item-meta-line em-event-time em-event-meta-datetime"> <span class="em-icon-clock em-icon"></span>DURACIóN: #_ATT{duracion_espectaculo} H. </div> </section>
And this is the code that i’ve used
function custom_event_section_based_on_author_role($replace, $EM_Event, $result) { $author_id = $EM_Event->event_owner; $author_roles = get_userdata($author_id)->roles; if (in_array('otros_profesionales', $author_roles)) { if ($result == '#_ATT{tipo_espectaculo}') { return ''; } else { return $replace; } } else { return $replace; } } add_filter('em_event_output_placeholder', 'custom_event_section_based_on_author_role', 10, 3);
This code only hide the value of #_ATT{tipo_espectaculo}, but I need all the <section class=”em-event-type”> to be hide.
Is it possible?
Some help, please?
Thanks. Carlos
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem with placeholder’ is closed to new replies.