Events Made Easy › Forums › How do I … › only show the first or second or third (etc.) event in list?
- This topic has 12 replies, 2 voices, and was last updated 3 years, 9 months ago by Franky.
-
AuthorPosts
-
Mon 22 Feb 2021 at 12:06 #62084AnonymousInactive
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.
Mon 22 Feb 2021 at 14:10 #62085FrankyKeymasterI’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).
Mon 22 Feb 2021 at 16:21 #62086AnonymousInactiveThank 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!
Mon 22 Feb 2021 at 16:36 #62087FrankyKeymasterBased on your screenshot, using header/footer templates (and change the template per entry too then of course) should work just fine.
Mon 1 Mar 2021 at 15:39 #62151AnonymousInactiveI 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:It also allows me to give the table a box-shadow style but it’s gone after I have saved. Any workaround for that?
Mon 1 Mar 2021 at 16:08 #62152FrankyKeymasterThat’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”.
Mon 1 Mar 2021 at 16:16 #62154AnonymousInactiveThat’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
Mon 1 Mar 2021 at 16:23 #62155FrankyKeymasterIf 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,styleMon 1 Mar 2021 at 16:26 #62156AnonymousInactive<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">
Mon 1 Mar 2021 at 16:37 #62157FrankyKeymasterThat’s because it contains ‘(‘ which wordpress (again) considers unsafe …
Try:
<table style="width: 100%; border-collapse: collapse; box-shadow: 3px 3px 9px 0px red;">
Mon 1 Mar 2021 at 16:43 #62158AnonymousInactiveThank you! That works perfectly!!!
Mon 1 Mar 2021 at 16:44 #62159FrankyKeymasterSee 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).Mon 1 Mar 2021 at 16:46 #62160FrankyKeymasterOr 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.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.