Support

Home Forums Event Espresso Premium Show Excerpt in Grid View

Show Excerpt in Grid View

Posted: April 3, 2019 at 7:05 am

Viewing 7 reply threads


Providence Art Club

April 3, 2019 at 7:05 am

Hi,
I would like to show my excerpt text in the grid view but can’t find where to do that. I’ve also searched the forums but couldn’t find a similar example.
Also, I’d like to rearrange the order of the text and have the ‘read more’ button on the bottom. I can see how to rearrange on the single events and table view, but not grid view.
Last question, can I set the depths of the grid blocks to be equal or a fixed depth?
You can see my test page here https://providenceartclub.org/test-expresso/
Thanks for any help!
Kathy


Tony

  • Support Staff

April 4, 2019 at 6:14 am

Hi Kathy,

You can do it, but you’ll need to edit the template used to generate the output.

Do you already have a custom template for the grid view template in your theme’s root directory? It will usually be named espresso-grid-template.template.php but can have a custom name if you’re setting a template_file attribute on the shortcode itself.

Are you comfortable with PHP and FTP/File manager on your server?


Providence Art Club

April 4, 2019 at 7:02 am

I have a child theme with the file ‘ espresso-grid-template.template.php ‘ at the root. I can upload that to my server via Dreamweaver. Not very good with php though.

And now I have another issue, hopefully can be solved with custom css, I was happy with how the grid blocks were appearing when I had 3 events, but then I added another row and things got off kilter, if you go to page https://providenceartclub.org/test-expresso/ you can see what I mean. I tried modifying the css but couldn’t figure out how to get them to line up. I think my css knowledge has gotten a bit rusty.


Tony

  • Support Staff

April 4, 2019 at 7:59 am

I have a child theme with the file โ€˜ espresso-grid-template.template.php โ€˜ at the root. I can upload that to my server via Dreamweaver. Not very good with php though.

It’s not a lot to change, more HTML than PHP really.

Around line 48 on the default has this:

<p class="event-link"><?php echo '<a class="register-link button" id="a_register_link-' . $post->ID .'" href="' . $registration_url . '">' . $button_text . '</a>'; ?></p>

That’s the code to output the register button, move that to below the P tag containing the dates, like so – https://monosnap.com/file/8bKl7Gy4StN3q1bNRG7hdahSlvpbwD

Your register button will now be at the bottom.

Adding the excerpt means you grids will all have to be set to use the height of the longest one, which may look messy if you don’t have similar length excerpts for each event?

To fix the spacing issue you need to set a height on the grids, for example:

.ee_grid_box_v2.item {
    height: 400px;
}


Providence Art Club

April 4, 2019 at 8:21 am

Thanks! I could have sworn I tried the height css before, but must have done something wrong. Your tips worked great. I just had to also change the .ee_overlay so my grey boxes would line up. I would still like to add the excerpt, as it will usually be just one line so shouldn’t look too ragged.


Tony

  • Support Staff

April 4, 2019 at 10:05 am

For the exceprt you can just add <?php the_excerpt(); ?>

So in my screenshot above you could add something like:

<p><?php the_excerpt(); ?></p>

Just above line 54 where you added the button code earlier, but it depends on where you want the expert output.


Providence Art Club

April 4, 2019 at 10:58 am

Thank you! you’ve been so helpful!


Tony

  • Support Staff

April 4, 2019 at 11:22 am

You’re most welcome ๐Ÿ™‚

If have a minute we would really appricate if you could share your experience with Event Espresso or provide a review on WP.org.

Viewing 7 reply threads

The support post ‘Show Excerpt in Grid View’ 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