caimin_nwl on "[Plugin: Events Manager] 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}</div>
</div>
[/events_list]

HTML output:
<div class="eventpagebox4col">
<div class="eventpageImage4col"></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}</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"></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/

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 311 تاريخ : جمعه 8 مرداد 1395 ساعت: 1:48