Hi,
You should be able to wrap the formatting in the “List item format” of the widget in the {not_long} conditional placeholder, causing long events to not be displayed.
Thanks.. that would be great.
But where should i put the {not_long}?
I got this:
<li style=”list-style:none; margin-left:-40px”>#_EVENTDATES <br /> <h4>#_EVENTLINK</h4>
#_EVENTIMAGE{320,200}<br />
<hr />
_____ when i add {not_long} there.. it adds a li /li after and before it…
-
This reply was modified 9 years, 6 months ago by
creativenl.
You need to put {not_long} at the very start of the formatting and {/not_long} at the very end.
I get that, but when i do that in the widget. it doesn’t work because the widget places itself a li /li around the {not_long]. The long term events doesn’t show, but still i got bullets for the long-term events without the txt and photo. And.. only 3 normal events in stead of 5 as i would want.
You can see this on the screendumps i added. above
In that case, the best option would be to use a normal text widget with a combination of shortcodes / formatting as below, allowing you to set the HTML tags more flexibly.
[event_list]
{not_long}
<ul>
<li style=”list-style:none; margin-left:-40px”>#_EVENTDATES <br /> <h4>#_EVENTLINK</h4>
#_EVENTIMAGE{320,200}<br />
<hr />
</li>
</ul>
{/not_long}
[/event_list]
How are you adding the shortcode to the page?
In a widget… but ok.. you meant to do this outside of the widgets or not… .. i will try that!
You should be able to use it in anywhere – inside and outside widgets.
ok.. but it doesn’t work in my case..
Concentrate on the widget… how can i fix that if i add your code.. it won’t be changed to:
<li>[event_list]
{not_long}
<ul>
<li style=”list-style:none; margin-left:-40px”>#_EVENTDATES <br /> <h4>#_EVENTLINK</h4>
#_EVENTIMAGE{320,200}<br />
<hr />
</li>
</ul>
{/not_long}
[/event_list]
</li>
___ automatically there is a li and /li around the code…
I’m not sure what you’re asking, but if you use the code I gave there should be no output for events that aren’t “long”.
I know.. they aren’t but as you can see there is a li before and /li after the code you gave me. When i insert your code in the widget automatically after saving i get those… for each long-event i got a button that i don’t want there..
I get this: https://www.dropbox.com/s/wt8csry9igcq8jq/Schermafbeelding%202016-11-09%20om%2016.01.50.png?dl=0
those bullets should be there..
I can try changing the code in the mysql db directly… but when i change something again it will fail again i think.
Are you using a text widget or using the code I gave in a normal page?