Support

Home Forums Event Espresso Premium Removing excerpt from event details

Removing excerpt from event details

Posted: February 2, 2016 at 3:04 pm


Joost

February 2, 2016 at 3:04 pm

I need to add an excerpt to an event for use by another plugin (Content Views Pro) but I do not want EE to show it with the EE event details (showing it is imho a bit atypical wordpress behavior as post excerpts are not shown with the post itself, but that as an aside). How can I delete the excerpt? I’m already using a custom content-espresso_event.php template file. I suppose I could manage it form there but can’t figure it out how. Any suggestion?

Thanks in advance,

Joost


Tony

  • Support Staff

February 3, 2016 at 4:39 am

Hi Joost,

Can you link us to one of your event pages this happens on please?


Joost

February 3, 2016 at 8:36 am

Hi Tony,

I created this example from an expired event: http://www.plukdeliefde.nl/events/polyborrel-dordrecht-2/

You notice the excerpt (“This is the excerpt”) between the title and the date-time that, imho, is not supposed to be there.

As mentioned I use a custom content-espresso_event.php template file. I’m not aware of messing things but for sake of completeness I add the code below so that you can verify.

Regards,

Joost


/**
 * This template will display a single event
 *
 * @ package		Event Espresso
 * @ author		Seth Shoultes
 * @ copyright	(c) 2008-2013 Event Espresso  All Rights Reserved.
 * @ license		https://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
 * @ link			http://www.eventespresso.com
 * @ version		4+
 */

global $post;
$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : '';
$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class );
?>
<?php do_action( 'AHEE_event_details_before_post', $post ); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>>

<?php if ( is_single() ) : ?>

	<div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-thumbnail' ); ?>
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-header' ); ?>
	</div>

	<div class="espresso-event-wrapper-dv">
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-details' ); ?>		
		<!-- <?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-datetimes' ); ?> 	
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-tickets' ); ?>
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-venues' ); ?>
		<footer class="event-meta">
			<?php do_action( 'AHEE_event_details_footer_top', $post ); ?>
			<?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?>
		</footer>
	</div>

<?php elseif ( is_archive() ) : ?>

	<div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-thumbnail' ); ?>
		<?php espresso_get_template_part( 'content/espresso/content', 'espresso_events-header' ); ?>
	</div>

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

<?php endif; ?>

</article>
<!-- #post -->
<?php do_action( 'AHEE_event_details_after_post', $post );
  • This reply was modified 8 years, 3 months ago by  Tony. Reason: Code formatting


Joost

February 3, 2016 at 8:38 am

Mmmmmm…. I notice that after posting the code is not well readable. I apologize. Please let me know if and how I should deliver it in a different way.


Tony

  • Support Staff

February 3, 2016 at 8:50 am

Its not your content-espresso_events.php template (more on this in a second)

It’s the /content/espresso/content-espresso_events-header.php file.

It has this:

<?php if ( ! is_archive() && has_excerpt( $post->ID )): the_excerpt(); endif;?>

Which I don’t think is expected.

If you edit that file, remove the above line and the excerpt will be removed.

You should be able to place the file within your child themes root directory to load from there.

However, in relation to your content-espresso_events.php template file, are you using that to simply changed the order of the event details?

Do you have other modified EE template files?


Joost

February 4, 2016 at 1:23 am

Thanks Tony for your quick reply,

On the excerpt I think I can proceed. On the template file: this is the only modified EE template file I have. Yes, I use this to reorder the items on an event page. I did this 9 months ago. Now I notice there is actually an option the reorder the items. Not sure if I missed that at the time or that it is part of a later release.


Tony

  • Support Staff

February 4, 2016 at 5:22 am

The custom ordering feature within Event Espresso core is not compatible with your current version of iced-mocha.

The reason for this is if you are using template files such as archive-espresso_events.php or single-espresso_events to order the event details (which iced mocha does) then EE assumes that your taking full control of the event details (like you have) and will not use the custom ordering as you ar doing that yourself.

We added a filter to allow you to override this however because iced-mocha is designed to allow you to alter all event details (before this feature was introduced) it will cause problems if you try to use both features at the same time.

However we do have a branch that is currently under testing that you are welcome to test if you would like?

https://github.com/eventespresso/iced-mocha/tree/FET-custom-template-order-v2

Note that this version of iced mocah may not be compatible with your child theme (depending on what you are using within it). I would recommend installing that version on a development copy of the site to see if it works for you rather than on the live site.

The support post ‘Removing excerpt from event details’ 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