Support

Home Forums Event Espresso Premium did espresso_events-details change with 4.7 or 4.8

did espresso_events-details change with 4.7 or 4.8

Posted: February 16, 2016 at 8:59 am

Viewing 6 reply threads


adasch

February 16, 2016 at 8:59 am

Hi there,
I’m just updating from 4.6.x to 4.8.33.

In 4.6 I modified the loop-espresso_events.php to display the events in two rows. I also modified content-espresso_events.php to change the order how the event elements are displayed.

-1-
The first thing i notice now is a new comment-line in loop-espresso_events.php
* DO NOT COPY THIS TEMPLATE TO YOUR THEMES FOLDER

Why is that? I need to alter this file in order to get my two column layout.

-2-
All of the sudden each event had doubled content in it. for example the event-datetimes are displayed two times!

I figured out, that with the new version I don’t call content-espresso_events.php but content-espresso_events-shortcode.php. Is that right?

I changed that and the double content was gone. But I still had to reorder the elements. I did what is written inside the xxxx-shortcode.php

* comment out calls to the_content() and espresso_event_content_or_excerpt()
* then UN-comment and position the additional template parts

so it looks like this:

	<div class="espresso-event-list-wrapper-dv">
		<?php //espresso_event_content_or_excerpt(); ?>
		<?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
		<?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
		<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
		<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>

I expected to get this:
– event-venue
– event-details
– event-datetimes
– event-tickets

But what I get is this:
– event-venue
– event-tickets
– event-datetimes
– event-details

– event-datetimes
– event-tickets

When I comment out the details I get this:
– event-venue
– event-datetimes
– event-tickets

So it seemd to me that “event-details” now means “tickets + datetimes + details”.

Does this make sense to anyone? ๐Ÿ™‚

I would really appreciate any help! thank you!


Josh

  • Support Staff

February 16, 2016 at 9:53 am

Hi there,

The re-ordering part is a built in option now. So you can remove the code you used for re-ordering the template parts and use the option instead. For the two column part, can you upload a copy of your single-espresso_events.php and/or archive-espresso_events.php, and your old loop file to a gist or a pastebin, then link here? We can take a look and offer some suggestions on how to make those two columns.


adasch

February 16, 2016 at 10:14 am

Hi Josh, thanks for your reply.
Where do I find the re-ordering option? I did not find them in the backend.

The 2-column-part in my loop.php looks like this:

		do_action( 'AHEE__archive_espresso_events_template__before_loop' );
		// Start the Loop.
		$is_last=0;
		while ( have_posts() ) : the_post();
			// Include the post TYPE-specific template for the content.

			if(($is_last % 2) == 1) { $last="last"; }
			else {$last=""; }

			echo "<div class='fusion-one-half one_half fusion-layout-column fusion-column ".$last." spacing-yes'>";
			espresso_get_template_part( 'content', 'espresso_events-shortcode' );
			echo "</div>";
			$is_last++;
		endwhile;

Kind of self-made, I know ๐Ÿ™‚ But it worked (until the update).

Thanks for your help!
adasch


Josh

  • Support Staff

February 16, 2016 at 10:19 am

The option is in Event Espresso > Events > Templates. Are you using the two column layout for the page with the [ESPRESSO_EVENTS] shortcode only?


adasch

February 17, 2016 at 12:46 am

Are you using the two column layout for the page with the [ESPRESSO_EVENTS] shortcode only?

Yes. So it looks like this:
https://www.akademie-psychotherapie.de/heilpraktiker-psychotherapie-ausbildung/#anmeldung


Josh

  • Support Staff

February 17, 2016 at 10:54 am

Your code should still work then so long as you update your copy of loop-espresso_events.php to call
espresso_get_template_part( 'content', 'espresso_events-shortcode' );


adasch

February 17, 2016 at 11:43 am

okay, than you!

Viewing 6 reply threads

The support post ‘did espresso_events-details change with 4.7 or 4.8’ 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