Title: BUG: when using code in events_list shortcode, extra  added
Last modified: September 1, 2016

---

# BUG: when using code in events_list shortcode, extra added

 *  Resolved [rattenkind](https://wordpress.org/support/users/rattenkind/)
 * (@rattenkind)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/)
 * Hi,
 * I just ran into a bug:
 * When pasting event listing code in the settings box (Default event list format),
   it works fine. However, when pasting it directly into the brackets of a events_list
   shortcode (to override the default list), EM adds an extra <p></p> after EVERY
   SINGLE EVENT in the list, thus breaking e.g. the flow of a responsive CSS grid.
   
   The expected behavior is that the identical placeholdercode should produce the
   same html output, no matter whether it is located in the default list format 
   setting, or as custom code directly inside the events_list shortcode.
 * Current Workaround: instead of inserting placeholder code between the shortcode
   brackets, insert it in the default list settings. Drawback of this workaround
   is of course that only ONE correctly working list format exists on your wordpress
   site.
 * **Demostration**:
 * I wanted to output a list of events in a responsive CSS grid. I had set up the
   CSS code and confirmed that it was working for non-EM lists, but whenever I applied
   the CSS to the events_list shortcode, the output was one-event per row, rather
   than 4 events per row. I found out that the problem was an extra <p></p> element
   that EM added without being asked to, thus breaking the layout.
 * **Example 1 (BUG):
    
   
    _Settings_: Default event list format (the html table 
   structure default setting)
 * _Code on page:
    
   [events\_list scope=”future” orderby=”event\_start\_date, event\
   _name” order=”ASC” limit=”4″]
    <div class=”eventpagebox4col”> <div class=”eventpageImage4col”
   >[#\_EVENTIMAGE{300,225}](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/?output_format=md#_EVENTURL)
   </div> </div> [/events_list]
 * _HTML output:
    
   <div class=”eventpagebox4col”>
    <div class=”eventpageImage4col”
   >[](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/xxx?output_format=md)
   </div> </div> <p> **<- PROBLEMATIC Paragraph tag that wasn’t in the code but 
   that EM puts in there, breaking layout** </p> <div class=”eventpagebox4col”> **
   <— next event in the list**
 * **Example 2 (working as expected):
    
   
    _Settings_: Default events list format
   box: <div class=”eventpagebox4col”> <div class=”eventpageImage4col”>[#_EVENTIMAGE{300,225}](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/?output_format=md#_EVENTURL)
   </div> </div>
 * _Code on page:
    
   [events_list scope=”future” orderby=”event_start_date, event_name”
   order=”ASC” limit=”4″][/events_list]
 * _HTML Output:
    
   <div class=”eventpagebox4col”>
    <div class=”eventpageImage4col”
   >[](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/xxx?output_format=md)
   </div> </div> <div class=”eventpagebox4col”> **<— next event in the list, note
   that there is no extra <p> element as expected…**
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

Viewing 1 replies (of 1 total)

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/#post-7611219)
 * Hi,
 * This is down do what your theme does with newline spacing, etc. and whether it
   uses wpautop:
 * [https://codex.wordpress.org/Function_Reference/wpautop](https://codex.wordpress.org/Function_Reference/wpautop)

Viewing 1 replies (of 1 total)

The topic ‘BUG: when using code in events_list shortcode, extra added’ is closed
to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [events_list](https://wordpress.org/support/topic-tag/events_list/)
 * [formatting](https://wordpress.org/support/topic-tag/formatting/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 1 reply
 * 2 participants
 * Last reply from: [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/bug-when-using-code-in-events_list-shortcode-extra-added/#post-7611219)
 * Status: resolved