Posted: 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! |
|
Sorry, I’m using EE4 |
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/ |
|
|
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… |
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. 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' ); ?> |
|
|
Do I need to create any pages with specific names for this to work properly? |
Hi Nick, Nope. |
|
|
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 really just want a list (or better yet a grid) of the event titles and featured images |
Hi Nick, Does your WordPress theme list out regular blog posts out as a list or a grid of post titles and featured images? |
|
|
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 |
|
It’s actually a “masonry”style stacked layout you can see here: |
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: |
|
|
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… |
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: |
|
|
Ok, I saw the index.php file. Same instructions with that file instead? |
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 |
|
|
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: |
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> |
|
|
Ok i got it looking pretty good. Thanks for the help on that.Sorry about the redirect; I have a temporary maintenance plugin running. |
Great! I’d love to see that page when it’s no longer being redirected. |
|
|
You can see it here for a few minutes… http://northstarbushcraft.com/events/introductory-tracking-workshop/ |
|
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.