• Resolved isaacalves

    (@isaacalves)


    How do I customize the Event Single and Events List templates?

    I’d like to add classes to the element that wraps date and time, customize /remove sharing buttons, remove post author, remove comments link, switch order of content (put the description of event above map and date, stuff like that).

    I can’t figure out how to do any of that, as there’s one line of code on the event-single.php template, for example.

    In brief: how do I have access to the HTML outputted in the Event Single and Events List templates?

    Thanks

    http://wordpress.org/plugins/events-manager/

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

    (@angelo_nwl)

    Thread Starter isaacalves

    (@isaacalves)

    Thanks, I have already read this article and copied the template folder inside my theme’s plugins folder. It’s working good.

    However that does not answer my question:

    As I said, the files that output the single event and the event list pages (event-single.php and events-list.php) have no html at all, only a few lines of code:

    content of event-single.php:

    global $EM_Event;
    echo $EM_Event->output_single();

    content of events-list.php:

    $args = apply_filters('em_content_events_args', $args);
    if( get_option('dbem_css_evlist') ) echo "<div class='css-events-list'>";
    echo EM_Events::output( $args );
    if( get_option('dbem_css_evlist') ) echo "</div>";

    That’s it.

    In addition, the content from those pages (single-event, events-list) is rendered into html tags (paragraphs, tables, etc) with no classes applied to it, which makes it very hard to find out where that html is located.

    So, how do I have access to the HTML code outputted in the Event Single and Events List templates, in a way where I can apply CSS classes and re-structure that HTML?

    Thanks a lot

    The comments,post author, etc are from your theme’s templates, not Event Manager.

    Events are amazingly easy to customize go to: Settings > Events.

    There you will see default event list and single event formatting options. You can customize the html any way you like and include any event related placeholders.

    Here’s an example of my single event:

    <div class="my-event-status">#_ATT{Event Status}</div> <!-- this is a custom attribute with drop-down select options -->
    <div class="my-custom-image">#_EVENTIMAGE{300,300}</div>
    <h3> #_EVENTDATES</h3>
    <h3><i>#_EVENTTIMES</i></h3>
    <h3>#_ATT{Cost}</h3> <!-- another custom attribute -->
    
       {has_location} <!-- a conditional check: IF the event has_location -->
    Where: #_LOCATIONLINK
      {/has_location}
    
    <br style="clear:both" />
    
    <p>  #_EVENTNOTES  </p>
    
      {has_bookings}
    <h3>Bookings</h3>
      #_BOOKINGFORM
      {/has_bookings}
    
    <h5>Categories</h5>
      #_CATEGORIES

    Thread Starter isaacalves

    (@isaacalves)

    Thanks, i found it under Settings. Sorry for my lack of attention.

    BTW, does anyone know of any Event Plugin for WordPress where I can customize the templates in a code editor, instead of a front-end settings panel?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Event Single and Events List customization’ is closed to new replies.