Support

Home Forums Event Espresso Premium How to get EE archives and shortcode archives to look the same?

How to get EE archives and shortcode archives to look the same?

Posted: December 30, 2015 at 7:58 pm


BCPTA

December 30, 2015 at 7:58 pm

Hi there,

We are trying to set up archives that are:
Ordered by descending order
Don’t show excerpts
Appear as other blog archives appear on the site

Right now our “expired” event shows at the top no matter what, and I can’t find a setting to change that. We don’t want to un-publish expired events or hide them.

When I use this shortcode, I can get the order to be descending on a WP page:

[ESPRESSO_EVENTS limit=”5″ sort=”DESC” show_expired=”true”]

But then the formatting breaks and the excerpts show.

Questions are:

Is there a shortcode option that could hide the excerpt? We can live with this.

Is there an existing class that would style the ‘shortcode archives’ the way the ‘regular archives’ are styled? We are using Genesis. I’m not sure how to find this.

Are there controls to show events in descending order, or at least to control the order of events in ‘regular archives’?

Thank you for your help


Josh

  • Support Staff

December 31, 2015 at 9:00 am

Hi Johanna,

I will follow up with each of your questions below:

Is there a shortcode option that could hide the excerpt? We can live with this.

Yes, the option that controls the display of the excerpt in all of the event lists (shortcode or theme archives, if the theme allows) is in Event Espresso > Events > Templates. You set Display Description to none.

Is there an existing class that would style the ‘shortcode archives’ the way the ‘regular archives’ are styled? We are using Genesis. I’m not sure how to find this.

I’m not sure what you mean by existing class. The difference between the two is the shortcode list loads within a WordPress page, and the native archive loads from the theme’s archive template. In both cases, the wrapper markup classes are controlled by the theme. If you can share a link to a page where the layout is broken, we can offer suggestions on how to fix the layout with CSS. Also, one nice thing about Genesis is its hooks allow for adding/removing markup from the theme, which might be useful here as well.

Are there controls to show events in descending order, or at least to control the order of events in ‘regular archives’?

We recommend using the shortcode to change the order of the event list display. If you want to change the order of the archives, this can be done by hooking into the WordPress API.

Here’s an example that shows how to change the sort order of the event archives (and event category archives too) :

https://gist.github.com/joshfeck/69faa00989c3014d4fde

You can add the above to into your Genesis child theme’s functions.php file.


BCPTA

January 10, 2016 at 2:37 am

Hello Josh, thank you for your help. The code you linked to worked to change the order of archives correctly for us.

I do have another question though.

when using the shortcode, we can use the controls in EventEspresso > Events > Templates to set archives to show the date and time, but not other information.

But when using the theme archives, the date and time won’t show.

Here is what our theme archives look like:

https://cloudup.com/c8C310SZ7-R

This is the ideal formatting and CSS we’d like to have appear if possible (i.e. photo on the left, smaller)

The main thing here is that the date and time doesn’t show.

Here is an archive using a shortcode on a page:

https://cloudup.com/cT-5ISgOQMa

It correctly shows the date and time, even though the formatting is off.

The thing we would like to correct on the shortcode archive is:

padding
image alignment

We strongly prefer showing the date and time so users can scan archives to find events they can attend in their schedule.

I understand CSS may be out of your support allowances, but if we can fix the date and time not showing in theme archives that would be helpful.

I’d be happy to send you direct links if I could do so privately.


Josh

  • Support Staff

January 11, 2016 at 10:55 am

Hi Johanna,

The missing datetimes on the native event archive may be caused by a custom function being run on the_excerpt() or the_content(). Normally those will just appear as they do here. The thing to look for are custom functions added to the WordPress child theme or a plugin that removes/adds to the_excerpt or the_content()


BCPTA

January 12, 2016 at 12:55 am

Hello Josh,
Thank you for this.

I sort of figured this out but will post here in case it’s useful to anyone else.

In Genesis, you have to use “excerpts” in your theme settings content archives area, as shown here: https://cloudup.com/c5qFCaCkXpU – in other words you can’t set it to display “Content” with a character count limit.

However, these theme settings do not affect the ‘shortcode archives method’ using the thumbnail size of image shown in the screenshot example above.

It DOES allow the thumbnail image size to display on the ‘regular’ archives (i.e. non-shortcode-use) of events.

In other words – Genesis Theme Settings can change how EE4 dates or excerpts show, but it can not affect the featured image size.

The other dilemma is that if for ‘regular blogs’ (non event listings) you wanted to use “content” with a character count limit, as Genesis allows in Theme Settings, you wouldn’t be able to do that, since these settings are site-wide for all archives. At least not without custom coding.

For us I think we’ll live for now. Thanks again for your prompt responses.


Josh

  • Support Staff

January 12, 2016 at 8:44 am

You might contact StudioPress support to see if they have readymade code examples that show how to set Custom Post types to have independent settings from the blog archives.

The support post ‘How to get EE archives and shortcode archives to look the same?’ 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