Support

Home Forums Event Espresso Premium My event list shows the entire content of each event

My event list shows the entire content of each event

Posted: March 5, 2014 at 6:48 pm


Nick Furfaro

March 5, 2014 at 6:48 pm

Im trying to figure out if there is a way to display an events page with a list of all events, but only show a few pieces of data for each event… Say title, price, daye and featured image. I can make a list, but it displays all the data for each event!


Nick Furfaro

March 5, 2014 at 6:51 pm

Sorry, I’m using EE4


Tony

  • Support Staff

March 6, 2014 at 3:42 am

Hi Nick,

With Event Espresso 4 the events are Custom Post Types and as such can be ‘themed’ in the same way Posts can. The default theme included within Event Espresso includes all the information, but there are a few options to alter this.

We have some documentation on theming Event Espresso available here:

https://eventespresso.com/2014/02/developers-corner-theming-event-espresso-4/


Nick Furfaro

March 6, 2014 at 6:56 am

I guess what I want to set up is an archive of events with just a few details showing, which when clicked link to the event itself. Not sure if this is possible…


Josh

  • Support Staff

March 6, 2014 at 1:33 pm

Hi Nick,

We’ve made it possible to copy the event templates into a create a child theme so they can be customized. Here are the steps to make a simplified event list:

1) Create a child theme.
2) Copy over loop-espresso_event.php and content-espresso_events.php to your child theme from the Event Espresso plugin’s templates/Espresso_Arabica_2014 folder
3) Rename content-espresso_events.php so it is now named content-espresso_events-list.php
4) Open up loop-espress_event.php and change line 41 so it reads:

espresso_get_template_part( 'content', 'espresso_events-list' );

5) Open up content-espresso_events-list.php and remove the code that displays the information you want removed from the event list.

For example, if you do not want the ticket selector and the datetimes displayed in the event list, you remove:

<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>


Nick Furfaro

March 12, 2014 at 6:59 am

Do I need to create any pages with specific names for this to work properly?


Josh

  • Support Staff

March 12, 2014 at 7:39 am

Hi Nick,

Nope.


Nick Furfaro

March 12, 2014 at 4:10 pm

Well, I’ve tried the changes listed above and haven’t seen any change in how my events are listed. I’m considering making a page with manually inserted links to each event…
I thought that setting the “event list pages” options to none, no,no,no in Events Espresso> general settings>templates would do it, but my events list shows all the details, datetimes,venues, etc.

I really just want a list (or better yet a grid) of the event titles and featured images


Josh

  • Support Staff

March 12, 2014 at 4:53 pm

Hi Nick,

Does your WordPress theme list out regular blog posts out as a list or a grid of post titles and featured images?


Nick Furfaro

March 12, 2014 at 4:56 pm

The blog is set up to display as a grid, and displays the title, an excerpt, and an image for each post, as well as a “read more” link


Nick Furfaro

March 12, 2014 at 5:02 pm

It’s actually a “masonry”style stacked layout you can see here:
http://northstarbushcraft.com/blog/
I’m using the “X” theme


Josh

  • Support Staff

March 12, 2014 at 5:15 pm

Hi Nick,

That’s great and you can use that if you’d like. What you’ll do is look for the archive.php file in your theme, copy it to your child theme, and rename it so its new name is “archive-espresso_events.php”. You may need to remove any of the templates you earlier copied over to the child theme from Event Espresso if you don’t see any changes after activating the child theme.

This is an example of what it looks like when the “Pronto” theme’s archive.php file copied and is used as the archive-espresso_events.php template:

https://www.evernote.com/shard/s4/sh/08371b34-6dce-4263-8490-a9d2c0366d30/bc73446b23c3b2b31dfb79b71fcf92c8


Nick Furfaro

March 12, 2014 at 6:47 pm

Is it possible that my theme doesn’t have an “archive. Php” file? I found an “archive_x_portfolio.php which must be for the portolio items, abd there is a file called custom_post_types.php or something similar…
The X theme has 3 options, called stacks, to choose from, so there are a few more folders to look through.


Josh

  • Support Staff

March 12, 2014 at 8:06 pm

Hi Nick,

It’s possible for a theme to not have an archive.php template. If a theme does not have an archive.php template or an equivalent, WordPress will fall back to the index.php file. Here’s a visual guide that helps explains the WordPress template hierarchy:

http://wphierarchy.com/


Nick Furfaro

March 12, 2014 at 8:10 pm

Ok, I saw the index.php file. Same instructions with that file instead?


Josh

  • Support Staff

March 13, 2014 at 10:33 am

Possibly, if there is actual template code in index.php then that should work. You’ll make a copy of index.php, place it in the child theme folder, and rename it:

archive-espresso_events.php


Nick Furfaro

March 13, 2014 at 12:34 pm

Ok, I’m making some progress here. I’ve made a copy of index.php, placed it in the child theme folder, and renamed it:
archive-espresso_events.php
My single events weren’t displaying enough detail( not able to register), so I copied “single-espresso_events.php” to my child theme as well, and now it works. The last thing would is that I need to modify single-espresso_events.php to use one of my page templates (?) as the content spans the whole page instead of being in a container like the rest of my site. you can see it here:
http://northstarbushcraft.com/events/bushcraft-foundation-course-level-1/
Or maybe there’s a better way you could point me towards.
Thanks


Josh

  • Support Staff

March 13, 2014 at 12:47 pm

Hi Nick,

I tried the link and it’s redirecting me to a contact page. Your assumption is correct though. You’ll want to modify single-espresso_events.php to make the container divs match the container divs in index.php.

The container divs in the sample templates we supply are taken from the twenty fourteen theme and look like this:

<div id="primary" class="content-area">
   <div id="content" class="site-content" role="main">
        // loop goes here
   </div>
</div>


Nick Furfaro

March 13, 2014 at 1:01 pm

Ok i got it looking pretty good. Thanks for the help on that.Sorry about the redirect; I have a temporary maintenance plugin running.


Josh

  • Support Staff

March 13, 2014 at 2:20 pm

Great! I’d love to see that page when it’s no longer being redirected.


Nick Furfaro

March 13, 2014 at 2:26 pm

You can see it here for a few minutes…

http://northstarbushcraft.com/events/introductory-tracking-workshop/


Dean

March 14, 2014 at 4:12 am

Hi,

The page looks good, is there anything else we can help you with on this topic or can we mark it as resolved?

The support post ‘My event list shows the entire content of each event’ 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