Support

Home Forums Event Espresso Premium creating a loop on the homepage

creating a loop on the homepage

Posted: February 6, 2014 at 12:10 am

Viewing 3 reply threads


Robert August

February 6, 2014 at 12:10 am

I am attempting to create a loop on the homepage which works fine here http://www.webbuster.us/query.php however when we apply this loop to the live site it fails. As well we are trying to split the Date short format split in two css class.


Dean

February 6, 2014 at 12:34 am

Hi Robert,

Could you explain in a bit more detail about what you are trying to achieve please? Are you trying to do something with the template files or with the JSON API?


Robert August

February 6, 2014 at 12:37 am

I am trying to display a loop of the 3 most recent event on the home page of this site http://cawpc.staging.wpengine.com/ . I would like to split the dates so the css. displays in the circles.


Robert August

February 6, 2014 at 12:53 am

I am working with the template files.


Dean

February 6, 2014 at 5:02 am

Hi,

Well, one way to do it would be to set up a page (or wherever) and use the shortcode [EVENT_LIST limit=3]. This will just list the next 3 upcoming events.

You could turn off the themeroller settings to allow you to style the events a little cleaner (this will effect all events site wide).

Regarding the CSS, well you could change the template code to something like this:

<p id="event_date-<?php echo $event_id ?>"><span class="section-title"><?php echo event_date_display($start_date, 'M'."<b\\r/>".'d') ?></span></p>

Which will output the short month, a line break and then the numerical day, which can then be styled accordingly.

  • This reply was modified 10 years, 9 months ago by Dean.
Viewing 3 reply threads

The support post ‘creating a loop on the homepage’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso