Events Made Easy Forums How do I … only show the first or second or third (etc.) event in list?

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #62084
    csquirrel
    Participant

    Cheers!

    First of all: EME is a fantastic plugin. Been recommending it to so often.
    Thank you for your amazing work!

    I don’t know if this is possible at all but here’s what I like to do:

    I want to show only the first, second, third, fourth, fifth and so on event in a list.

    I am currently working with a page builder and want to give every section a certain event to show.

    #62085
    Franky
    Keymaster

    I’m a bit unsure about your question: [eme_events] already shows events in a list, and using the optional header/footer templates you can change the “list” to your liking (default is html “ul” list style). If you need a specific event in a section on your page, I’d recommend to use EME categories for that (or [eme_event] with the event-id, but that’s not as flexible).

    #62086
    csquirrel
    Participant

    Thank you for your response!

    I try to create something like that:

    https://ibb.co/NYkwMj9 (Image-Link)

    Those are all seperate sections. Of course I can show the first one with limit=1. What I am looking for is some work around to give the second one something like “limit=2 + don’t show the first one”.

    The header/footer concept would be another possible solution, I am looking into that. Thank you!

    #62087
    Franky
    Keymaster

    Based on your screenshot, using header/footer templates (and change the template per entry too then of course) should work just fine.

    #62151
    csquirrel
    Participant

    I came a little bit further:
    Ccreated a template to show the single entries the way it is in the example.I was able to mimic the effect of the page builder with a table in the template:

    https://ibb.co/2n6q7WM

    It also allows me to give the table a box-shadow style but it’s gone after I have saved. Any workaround for that?

    #62152
    Franky
    Keymaster

    That’s probably wordpress removing unwanted html tags/values. Fortunately EME can help you keep those. See the EME Settings, tab “Other”, the section about “Extra html tags”.

    #62154
    csquirrel
    Participant

    That’s a great function.

    So I should just include ‘box-shadow’ under extra HTML-style-attributes?

    edit: just tried it. doesn’t seem to work

    #62155
    Franky
    Keymaster

    If you can post a minimal html (css included) that works and the result wordpress makes of it, then I can see too. I imagine some style tag is added and that might get filtered out too, so under extra html-tags you should probably add your html tag with the style attribute. An example for span:
    span,style

    #62156
    csquirrel
    Participant

    <table style="width: 100%; border-collapse: collapse; box-shadow: 3px 3px 9px 0px rgba(0,0,0,0.3);">

    this one works and is also shown in the wysiwyg-editor.

    after saving it turns into:

    <table style="width: 100%;border-collapse: collapse">

    #62157
    Franky
    Keymaster

    That’s because it contains ‘(‘ which wordpress (again) considers unsafe …
    Try:
    <table style="width: 100%; border-collapse: collapse; box-shadow: 3px 3px 9px 0px red;">

    #62158
    csquirrel
    Participant

    Thank you! That works perfectly!!!

    #62159
    Franky
    Keymaster

    See also: https://developer.wordpress.org/reference/hooks/safecss_filter_attr_allow_css/
    If you want to use “rgba()” notation, you can create your own filter and allow it (so you can use other colors).

    #62160
    Franky
    Keymaster

    Or more easy: don’t use inline styling, but add a css-class of your own making to it, and in your theme then define the styling rules for that css class.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.