Support » Plugin: Events Manager » Skip First Record/Event?

  • Resolved peterallcdn

    (@peterallcdn)


    Hello,

    In my list of events, I want the first event to have a different layout than the following events. The first event should display an image and the following events should not.

    To do this, I was hoping to use 2 shortcodes…

    [events_list limit=”1″]… First Event…[/events_list]
    [events_list limit=”4″]… Second – Fifth events…[/events_list]

    To do this, I need the second shortcode to skip the first returned record so that it isn’t a duplicate of the record returned in the first shortcode.

    I browsed the documentation and searched this forum but couldn’t find anything regarding skipping the first X number of events/records. Is this possible?

    Thanks.

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

    (@angelo_nwl)

    sorry I’m afraid that this is not possible at the moment and might need custom coding on your part to make this work.

    I am not part of support… just some dude…
    We’ll start off with some basics…
    you are doing a “Search” which in your shortcode could be anything from categories, locations, dates etc..
    http://wp-events-plugin.com/documentation/event-search-attributes/

    And thusly we will try to use “offset”… so try this first.
    Notice for our test we are not using the “closing short code” of
    [/events_list]
    ===========================
    So on a Page or Post put this shortcode in…

    [events_list limit="1"]
    =============================
    [events_list limit="4" offset="1"]

    I put the “=============” just as a separator of the two lists.
    I test the above and it is working for me.

    NOTE: The above short code is using the/your predefined “Events List”
    that is in
    Events -> Settings
    Click the tab Formating
    Click Events and it will expand….
    This is where you manage your default Events List.

    So if you at least have the above working.. that is the “offset”…
    What you need to do now is make two Events List.. which is basically what you had originally posted…. The first one will include the place holder for the image..
    The second list will use the offset and not have the image.

    Below code is a basic example… there is almost no limit to the formatting either in a Table format or with DIV layouts.

    Place the code in a Post or Page
    VERY IMPORTANT —> USE THE TEXT Editor
    If you switch back and for between the Visual Editor and the Text Editor WordPress will mangle the code

    <table>
    [events_list limit="1" ]
    <tr>
    <td>#_EVENTIMAGE{125,69}
    #_EVENTDATES
    #_EVENTTIMES</td>
    <td>
    <div style="font-size: 14pt; font-weight: bold;">#_EVENTLINK</div>
    {has_location}
    <div style="font-size: 14pt; font-weight: bold; color: #0000ff!important;"><i>#_LOCATIONNAME</i></div>
    {/has_location}</td>
    [/events_list]
    </tr>
    </table>
    <div>=======   And our Offset with No Image List   ============</div>
    <table>
    [events_list limit="4" offset="1"]
    <tr>
    <td>#_EVENTDATES
    #_EVENTTIMES</td>
    <td>
    <div style="font-size: 14pt; font-weight: bold;">#_EVENTLINK</div>
    {has_location}
    <div style="font-size: 14pt; font-weight: bold; color: #0000ff!important;"><i>#_LOCATIONNAME</i></div>
    {/has_location}</td>
    [/events_list]
    </tr>
    </table>

    And the many placeholders that can be added to your Events Lists…
    http://wp-events-plugin.com/documentation/placeholders/

    • This reply was modified 2 years, 7 months ago by Robswaimea.

    offset=”1″ appears to do what I need.

    Thanks, the help is much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Skip First Record/Event?’ is closed to new replies.