Events Made Easy › Forums › How do I … › Display just the date and location on the events list page
- This topic has 10 replies, 2 voices, and was last updated 13 years, 3 months ago by Franky.
-
AuthorPosts
-
Fri 12 Aug 2011 at 20:47 #43409AnonymousInactive
Hello Franky,
I use the following for the default events list format
#_{j M Y} [events_if tag=”#ESC_{j M Y}” notvalue=”#ESC@_{j M Y}”] #@_{- j M Y} [/events_if]
#_NAME #_LOCATION</p>And in my sidebar I use <?php echo do_shortcode(‘[events_list category=2 limit=6]
‘); ?>
I have the same events happening at different locations and would like to just list the dates and location on a page I have created for that event.
For example:
How to make bread
22 Sep 2011 – 23 Sep 2011 London
24 Sep 2011 – 25 Sep 2011 Dover
I have also created separate pages for each location. Is it possible to link London (as shown above)to the London page?
Many thanks
Fri 12 Aug 2011 at 22:36 #48292FrankyKeymasterUse attributes for that: one that contains the url (or complete link with text) of where you want to link to, and use that in your event formatting.
Sat 13 Aug 2011 at 11:09 #48293AnonymousInactiveSorry Franky, Can you show me an example of how to add the attributes?
Sat 13 Aug 2011 at 11:26 #48294Mon 15 Aug 2011 at 08:03 #48295AnonymousInactiveHello Franky,
Using the attributes works a treat using a widget, but messes up the formating in places using short codes.
So I have created a widget for a page but would it be possible to hard code the widget as php using this code which I put in the list item format of the widget.
#_{j M Y} [events_if tag=”#ESC_{j M Y}” notvalue=”#ESC@_{j M Y}”] #@_{- j M Y} [/events_if]
#_NAME
#_LOCATION
#_ATT{assessment_date}Many thanks in advance for your time.
Mon 15 Aug 2011 at 08:16 #48296FrankyKeymasterWhat do you mean with “it messes up formatting in places using short codes”?
Mon 15 Aug 2011 at 08:32 #48297AnonymousInactiveThe attribute from another event (5 Oct 2011) for some reason has appeared in front of another event (29 Sep 2011 – 30 Sep 2011) in the events lists (see below).
26 Sep 2011 – 27 Sep 2011
5 Oct 201129 Sep 2011 – 30 Sep 2011
13 Oct 2011 – 14 Oct 2011
20 Oct 2011 – 21 Oct 2011
But, if I use a widget it formats okay. It only happens when I use short codes?
Mon 15 Aug 2011 at 08:35 #48298AnonymousInactiveThe attribute (#_ATT{assessment_date} was added to the 26 Sep 2011 – 27 Sep 2011 but for some reason in the events list it appears in front of the next event (29 Sep 2011 – 30 Sep 2011)
Mon 15 Aug 2011 at 08:44 #48299FrankyKeymasterThat’s because you tell in the formatting to show the attribute:
#_ATT{assessment_date}
so when you give it a value, it will show.
If you only want to use the assessment_date attribute for comparison reasons, use it inside a [events_if] condition. If not: add some text to it in case it’s not empty (using conditional tags again) or so.
Mon 15 Aug 2011 at 08:49 #48300AnonymousInactiveI gave it a value (5 Oct 2011) for the 26 Sep 2011 – 27 Sep 2011 event which is shows but on the events list it shows in front of the next event like this 5 Oct 201129 Sep 2011 – 30 Sep 2011
Mon 15 Aug 2011 at 10:31 #48301FrankyKeymasterRead my comment again …
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.