Support

Home Forums Event Espresso Premium Reordering & Adding Details on Event List Page – EE4

Reordering & Adding Details on Event List Page – EE4

Posted: April 25, 2014 at 7:23 pm

Viewing 13 reply threads


atartaglia

April 25, 2014 at 7:23 pm

I would like to re-order the way my event list page displays the details of events. My page can be found here: http://sjjuniortour.com/tournaments/ (I updated the slug to use tournaments instead of events).

I would like “Event Details” to be removed/hidden, and “Upcoming Dates & Times” and “Event Location” to move above the “Ticket Options”. Has anybody been able to do this? Would you mind telling me what files I need to update?

I am assuming there are some files I will need to copy into my template folder but as of yet, I can’t figure out what files I need to change.

Thanks!


Lorenzo Orlando Caum

  • Support Staff

April 25, 2014 at 7:32 pm

Hello,

Please take a look at the following resources:

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

https://eventespresso.com/wiki/ee4-themes-templates/

https://eventespresso.com/topic/ee4-custom-events-listing-display/#post-84466


Lorenzo


atartaglia

April 25, 2014 at 7:35 pm

I’d also love to know how to hide those images. I can’t figure out where they are located either.


atartaglia

April 25, 2014 at 7:37 pm

I already know how to create child themes and the like. What would be helpful is knowing specifically how this data is being called in a particular order, and where I can change that order.

Where is the write-up for that?


Lorenzo Orlando Caum

  • Support Staff

April 25, 2014 at 8:06 pm

Sure no problem! I wasn’t sure if you had seen those.

If you look in the Espresso_Arabica_2014 folder you’ll see a handful of templates.

The event list page uses archive-espresso_events.php and that file calls content-espresso_events.php which in turn calls specific templates depending on if its a single event page or the event list page.


Lorenzo


atartaglia

April 25, 2014 at 8:14 pm

OK, I see the following code

<code>&lt;?php elseif ( is_archive() ) : ?&gt;

	&lt;div id=&quot;espresso-event-list-header-dv-&lt;?php echo $post-&gt;ID;?&gt;&quot; class=&quot;espresso-event-header-dv&quot;&gt;
		&lt;?php espresso_get_template_part( &#039;content&#039;, &#039;espresso_events-thumbnail&#039; ); ?&gt;
		&lt;?php espresso_get_template_part( &#039;content&#039;, &#039;espresso_events-header&#039; ); ?&gt;
	&lt;/div&gt;
		
	&lt;div class=&quot;espresso-event-list-wrapper-dv&quot;&gt;	
		&lt;?php espresso_get_template_part( &#039;content&#039;, &#039;espresso_events-datetimes&#039; ); ?&gt;
		&lt;?php espresso_get_template_part( &#039;content&#039;, &#039;espresso_events-details&#039; ); ?&gt;
	&lt;/div&gt;
		
&lt;?php endif; ?&gt;</code>

I am guessing this is where I change the order but any change I make is not affecting my events list page.


atartaglia

April 25, 2014 at 8:14 pm


<?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_events-thumbnail' ); ?>
<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
</div>

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

<?php endif; ?>


atartaglia

April 25, 2014 at 8:15 pm

Let me try this again …

[code language=”php”]
<?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_events-thumbnail’ ); ?>
<?php espresso_get_template_part( ‘content’, ‘espresso_events-header’ ); ?>
</div>

<div class=”espresso-event-list-wrapper-dv”>
<?php espresso_get_template_part( ‘content’, ‘espresso_events-datetimes’ ); ?>
<?php espresso_get_template_part( ‘content’, ‘espresso_events-details’ ); ?>
</div>

<?php endif; ?>
[/code]


Lorenzo Orlando Caum

  • Support Staff

April 25, 2014 at 8:24 pm

What is the location of these files?


Lorenzo


atartaglia

April 25, 2014 at 8:33 pm

Yes, I would imagine that would help.

So I want to change the order of the files on the main “events” page (whose slug I updated to be /tournaments using a snippet). I tried reordering the “get_templates” in the “content-espresso_events.php” file but had no luck in changing the order of my http://sjjuniortour.com/tournaments/ page to be:

Date and Time
Event Location
Division (tickets)


atartaglia

April 26, 2014 at 6:26 am

So I took a different path and decided to build out the page by updating the loop-espresso_events.php file. Here is what that file looks like now:

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”><?php
/**
* This template will display The Loop that displays your events
*
* @ 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+
*/

if ( have_posts() ) : ?>

<header class="page-header">
<h1 class="page-title">
<?php
if ( is_day() ) :
printf( __( 'Today\'s Events: %s', 'event_espresso' ), get_the_date() );

elseif ( is_month() ) :
printf( __( 'Events This Month: %s', 'event_espresso' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'event_espresso' ) ) );

elseif ( is_year() ) :
printf( __( 'Events This Year: %s', 'event_espresso' ), get_the_date( _x( 'Y', 'yearly archives date format', 'event_espresso' ) ) );

else :
echo apply_filters( 'FHEE__archive_espresso_events_template__upcoming_events_h1', __( 'Upcoming Events', 'event_espresso' ));

endif;
?>
</h1>
</header><!– .page-header –>

<?php
// allow other stuff
do_action( 'AHEE__archive_espresso_events_template__before_loop' );
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the post TYPE-specific template for the content.
//espresso_get_template_part( 'content', 'espresso_events' );
?>
<!– HEADER –>
<h2>
<?php the_title(); ?>
</h2>

<!– /HEADER –>

<!– EVENT DATE & TIMES –>
<div class="event-datetimes">
<h4 class="event-datetimes-h3 ee-event-h3">
<span class="dashicons dashicons-calendar"></span><?php _e( 'Tournament Date & Time', 'event_espresso' ); ?>
</h4>
<?php espresso_list_of_event_dates( $post->ID );?>
</div>
<!– /EVENT DATE & TIMES –>

<!– LOCATION –>
<?php
//echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . '   <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';

if (( is_single() && espresso_display_venue_in_event_details() ) || is_archive() && espresso_display_venue_in_event_list() ) :
global $post;
do_action( 'AHEE_event_details_before_venue_details', $post );?>

<h4 class="event-venues-h3 ee-event-h3">
<span class="ee-icon ee-icon-venue"></span><?php _e( 'Club: ', 'event_espresso' ); ?><?php espresso_venue_name(); ?>
</h4>
<div class="espresso-venue-dv">
<!–<h5><?php _e( 'Venue:', 'event_espresso' ); ?>   <?php espresso_venue_name(); ?></h5>
<p><span class="smaller-text tags-links"><?php echo espresso_venue_categories(); ?></span></p>–>
<?php if ( espresso_venue_has_address( $post->ID )) : ?>
<span class="dashicons dashicons-location-alt"></span><?php _e( 'Address:', 'event_espresso' ); ?>
<?php espresso_venue_address( 'inline' ); ?>
<?php espresso_venue_gmap( $post->ID ); ?>
<div class="clear"><br/></div>
<?php endif; ?>
<?php if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?>
<p>
<span class="small-text"><?php _e( 'Club Phone:', 'event_espresso' ); ?></span> <?php echo $venue_phone; ?>
</p>
<?php endif; ?>
<?php if ( has_excerpt() ) : ?>
<p>
<?php _e( 'Description:', 'event_espresso' ); ?><br/>
<?php echo espresso_venue_excerpt( $post->ID ); ?>
</p>
<?php endif; ?>

</div>
<!– .espresso-venue-dv –>
<?php
do_action( 'AHEE_event_details_after_venue_details', $post );
endif;
?>
<!– /LOCATION –>

<!– TICKETS –>

<?php
//echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . '   <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
global $post;
if ( espresso_display_ticket_selector( $post->ID ) && ( is_single() || ( is_archive() && espresso_display_ticket_selector_in_event_list() ))) :
?>
<br/>
<div class="event-tickets" style="clear: both;">
<h4 class="ticket-selector-h3 ee-event-h3">
<span class="ee-icon ee-icon-tickets"></span><?php _e( 'Purchase Tickets', 'event_espresso' ); ?>
</h4>
<?php espresso_ticket_selector( $post ); ?>
</div>
<!– .event-tickets –>
<?php elseif ( ! is_single() ) : ?>
<?php espresso_view_details_btn( $post ); ?>
<?php endif; ?>

<!– /TICKETS –>
<hr />
<?php
endwhile;
// Previous/next page navigation.
espresso_pagination();
// allow moar other stuff
do_action( 'AHEE__archive_espresso_events_template__after_loop' );

else :
// If no content, include the "No posts found" template.
espresso_get_template_part( 'content', 'none' );

endif;

I’m sure there are simpler solutions but that is what worked for me. Another question, how do I remove the language “* Please note that a maximum number of 10 tickets can be purchased for this event per order.” and the “show details+” link? Once I get rid of those I will be good to go.

Thanks.


atartaglia

April 26, 2014 at 6:27 am

So I took a different path and decided to build out the page by updating the loop-espresso_events.php file. Here is what that file looks like now:

[code language=”php”]<?php
/**
* This template will display The Loop that displays your events
*
* @ 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+
*/

if ( have_posts() ) : ?>

<header class=”page-header”>
<h1 class=”page-title”>
<?php
if ( is_day() ) :
printf( __( ‘Today\’s Events: %s’, ‘event_espresso’ ), get_the_date() );

elseif ( is_month() ) :
printf( __( ‘Events This Month: %s’, ‘event_espresso’ ), get_the_date( _x( ‘F Y’, ‘monthly archives date format’, ‘event_espresso’ ) ) );

elseif ( is_year() ) :
printf( __( ‘Events This Year: %s’, ‘event_espresso’ ), get_the_date( _x( ‘Y’, ‘yearly archives date format’, ‘event_espresso’ ) ) );

else :
echo apply_filters( ‘FHEE__archive_espresso_events_template__upcoming_events_h1’, __( ‘Upcoming Events’, ‘event_espresso’ ));

endif;
?>
</h1>
</header><!– .page-header –>

<?php
// allow other stuff
do_action( ‘AHEE__archive_espresso_events_template__before_loop’ );
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the post TYPE-specific template for the content.
//espresso_get_template_part( ‘content’, ‘espresso_events’ );
?>
<!– HEADER –>
<h2>
<?php the_title(); ?>
</h2>

<!– /HEADER –>

<!– EVENT DATE & TIMES –>
<div class=”event-datetimes”>
<h4 class=”event-datetimes-h3 ee-event-h3″>
<span class=”dashicons dashicons-calendar”></span><?php _e( ‘Tournament Date & Time’, ‘event_espresso’ ); ?>
</h4>
<?php espresso_list_of_event_dates( $post->ID );?>
</div>
<!– /EVENT DATE & TIMES –>

<!– LOCATION –>
<?php
//echo ‘<br/><h6 style=”color:#2EA2CC;”>’. __FILE__ . ‘   <span style=”font-weight:normal;color:#E76700″> Line #: ‘ . __LINE__ . ‘</span></h6>’;

if (( is_single() && espresso_display_venue_in_event_details() ) || is_archive() && espresso_display_venue_in_event_list() ) :
global $post;
do_action( ‘AHEE_event_details_before_venue_details’, $post );?>

<h4 class=”event-venues-h3 ee-event-h3″>
<span class=”ee-icon ee-icon-venue”></span><?php _e( ‘Club: ‘, ‘event_espresso’ ); ?><?php espresso_venue_name(); ?>
</h4>
<div class=”espresso-venue-dv”>
<!–<h5><?php _e( ‘Venue:’, ‘event_espresso’ ); ?>   <?php espresso_venue_name(); ?></h5>
<p><span class=”smaller-text tags-links”><?php echo espresso_venue_categories(); ?></span></p>–>
<?php if ( espresso_venue_has_address( $post->ID )) : ?>
<span class=”dashicons dashicons-location-alt”></span><?php _e( ‘Address:’, ‘event_espresso’ ); ?>
<?php espresso_venue_address( ‘inline’ ); ?>
<?php espresso_venue_gmap( $post->ID ); ?>
<div class=”clear”><br/></div>
<?php endif; ?>
<?php if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?>
<p>
<span class=”small-text”><?php _e( ‘Club Phone:’, ‘event_espresso’ ); ?></span> <?php echo $venue_phone; ?>
</p>
<?php endif; ?>
<?php if ( has_excerpt() ) : ?>
<p>
<?php _e( ‘Description:’, ‘event_espresso’ ); ?><br/>
<?php echo espresso_venue_excerpt( $post->ID ); ?>
</p>
<?php endif; ?>

</div>
<!– .espresso-venue-dv –>
<?php
do_action( ‘AHEE_event_details_after_venue_details’, $post );
endif;
?>
<!– /LOCATION –>

<!– TICKETS –>

<?php
//echo ‘<br/><h6 style=”color:#2EA2CC;”>’. __FILE__ . ‘   <span style=”font-weight:normal;color:#E76700″> Line #: ‘ . __LINE__ . ‘</span></h6>’;
global $post;
if ( espresso_display_ticket_selector( $post->ID ) && ( is_single() || ( is_archive() && espresso_display_ticket_selector_in_event_list() ))) :
?>
<br/>
<div class=”event-tickets” style=”clear: both;”>
<h4 class=”ticket-selector-h3 ee-event-h3″>
<span class=”ee-icon ee-icon-tickets”></span><?php _e( ‘Purchase Tickets’, ‘event_espresso’ ); ?>
</h4>
<?php espresso_ticket_selector( $post ); ?>
</div>
<!– .event-tickets –>
<?php elseif ( ! is_single() ) : ?>
<?php espresso_view_details_btn( $post ); ?>
<?php endif; ?>

<!– /TICKETS –>
<hr />
<?php
endwhile;
// Previous/next page navigation.
espresso_pagination();
// allow moar other stuff
do_action( ‘AHEE__archive_espresso_events_template__after_loop’ );

else :
// If no content, include the “No posts found” template.
espresso_get_template_part( ‘content’, ‘none’ );

endif;

[/code]

I’m sure there are simpler solutions but that is what worked for me. Another question, how do I remove the language “* Please note that a maximum number of 10 tickets can be purchased for this event per order.” and the “show details+” link? Once I get rid of those I will be good to go.

Thanks.


atartaglia

April 26, 2014 at 6:28 am

So I took a different path and decided to build out the page by updating the loop-espresso_events.php file. Here is what that file looks like now:

[code language=”php”]
<?php
/**
* This template will display The Loop that displays your events
*
* @ 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+
*/

if ( have_posts() ) : ?>

<header class=”page-header”>
<h1 class=”page-title”>
<?php
if ( is_day() ) :
printf( __( ‘Today\’s Events: %s’, ‘event_espresso’ ), get_the_date() );

elseif ( is_month() ) :
printf( __( ‘Events This Month: %s’, ‘event_espresso’ ), get_the_date( _x( ‘F Y’, ‘monthly archives date format’, ‘event_espresso’ ) ) );

elseif ( is_year() ) :
printf( __( ‘Events This Year: %s’, ‘event_espresso’ ), get_the_date( _x( ‘Y’, ‘yearly archives date format’, ‘event_espresso’ ) ) );

else :
echo apply_filters( ‘FHEE__archive_espresso_events_template__upcoming_events_h1’, __( ‘Upcoming Events’, ‘event_espresso’ ));

endif;
?>
</h1>
</header><!– .page-header –>

<?php
// allow other stuff
do_action( ‘AHEE__archive_espresso_events_template__before_loop’ );
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the post TYPE-specific template for the content.
//espresso_get_template_part( ‘content’, ‘espresso_events’ );
?>
<!– HEADER –>
<h2>
<?php the_title(); ?>
</h2>

<!– /HEADER –>

<!– EVENT DATE & TIMES –>
<div class=”event-datetimes”>
<h4 class=”event-datetimes-h3 ee-event-h3″>
<span class=”dashicons dashicons-calendar”></span><?php _e( ‘Tournament Date & Time’, ‘event_espresso’ ); ?>
</h4>
<?php espresso_list_of_event_dates( $post->ID );?>
</div>
<!– /EVENT DATE & TIMES –>

<!– LOCATION –>
<?php
//echo ‘<br/><h6 style=”color:#2EA2CC;”>’. __FILE__ . ‘   <span style=”font-weight:normal;color:#E76700″> Line #: ‘ . __LINE__ . ‘</span></h6>’;

if (( is_single() && espresso_display_venue_in_event_details() ) || is_archive() && espresso_display_venue_in_event_list() ) :
global $post;
do_action( ‘AHEE_event_details_before_venue_details’, $post );?>

<h4 class=”event-venues-h3 ee-event-h3″>
<span class=”ee-icon ee-icon-venue”></span><?php _e( ‘Club: ‘, ‘event_espresso’ ); ?><?php espresso_venue_name(); ?>
</h4>
<div class=”espresso-venue-dv”>
<!–<h5><?php _e( ‘Venue:’, ‘event_espresso’ ); ?>   <?php espresso_venue_name(); ?></h5>
<p><span class=”smaller-text tags-links”><?php echo espresso_venue_categories(); ?></span></p>–>
<?php if ( espresso_venue_has_address( $post->ID )) : ?>
<span class=”dashicons dashicons-location-alt”></span><?php _e( ‘Address:’, ‘event_espresso’ ); ?>
<?php espresso_venue_address( ‘inline’ ); ?>
<?php espresso_venue_gmap( $post->ID ); ?>
<div class=”clear”><br/></div>
<?php endif; ?>
<?php if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?>
<p>
<span class=”small-text”><?php _e( ‘Club Phone:’, ‘event_espresso’ ); ?></span> <?php echo $venue_phone; ?>
</p>
<?php endif; ?>
<?php if ( has_excerpt() ) : ?>
<p>
<?php _e( ‘Description:’, ‘event_espresso’ ); ?><br/>
<?php echo espresso_venue_excerpt( $post->ID ); ?>
</p>
<?php endif; ?>

</div>
<!– .espresso-venue-dv –>
<?php
do_action( ‘AHEE_event_details_after_venue_details’, $post );
endif;
?>
<!– /LOCATION –>

<!– TICKETS –>

<?php
//echo ‘<br/><h6 style=”color:#2EA2CC;”>’. __FILE__ . ‘   <span style=”font-weight:normal;color:#E76700″> Line #: ‘ . __LINE__ . ‘</span></h6>’;
global $post;
if ( espresso_display_ticket_selector( $post->ID ) && ( is_single() || ( is_archive() && espresso_display_ticket_selector_in_event_list() ))) :
?>
<br/>
<div class=”event-tickets” style=”clear: both;”>
<h4 class=”ticket-selector-h3 ee-event-h3″>
<span class=”ee-icon ee-icon-tickets”></span><?php _e( ‘Purchase Tickets’, ‘event_espresso’ ); ?>
</h4>
<?php espresso_ticket_selector( $post ); ?>
</div>
<!– .event-tickets –>
<?php elseif ( ! is_single() ) : ?>
<?php espresso_view_details_btn( $post ); ?>
<?php endif; ?>

<!– /TICKETS –>
<hr />
<?php
endwhile;
// Previous/next page navigation.
espresso_pagination();
// allow moar other stuff
do_action( ‘AHEE__archive_espresso_events_template__after_loop’ );

else :
// If no content, include the “No posts found” template.
espresso_get_template_part( ‘content’, ‘none’ );

endif;

[/code]

I’m sure there are simpler solutions but that is what worked for me. Another question, how do I remove the language “* Please note that a maximum number of 10 tickets can be purchased for this event per order.” and the “show details+” link? Once I get rid of those I will be good to go.

Thanks.


Dean

April 26, 2014 at 7:59 am

Hi,

The following CSS should do the trick.

.tkt-slctr-tbl-wrap-dv p {
display: none;
}
.display-tckt-slctr-tkt-details { display: none; }
Viewing 13 reply threads

The support post ‘Reordering & Adding Details on Event List Page – EE4’ 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