Support

Home Forums Event Espresso Premium Duplicate Dates in Category List View

Duplicate Dates in Category List View

Posted: May 5, 2015 at 1:35 pm

Viewing 7 reply threads


laurena

May 5, 2015 at 1:35 pm

I am having a problem with my new EE4 installation. I have things looking ALMOST how I want them – with one problem. There are duplicate dates when I view the events by event-category list view.

Example:

http://emergencysavealife.ca/events/ – looks just fine
http://emergencysavealife.ca/event-category/emr-and-first-responder/ – has a duplicate datetime

I can hack the template to remove the datetime line on the category view, but it also removes it on the /events/ page (where I need it to stay).

Please advise!


Dean

May 6, 2015 at 3:27 am

Hi,

I know you said this was a new installation, but can I clarify whether you have modified any of the EE templates or added EE template tags to your theme files?

Have you tried swapping to a default theme such as Twentyfifteen to see if it occurs there as well? (Theme Test Drive is a useful plugin for that).


laurena

May 6, 2015 at 9:11 am

Hi Dean,

Thanks for your response. I have added several of the theme files from Arabica to my theme folder, and have used the Genesis archive-espresso_events.php I found on the blog, as a starter.

Using Theme Test Drive, I see that the duplication is not an issue in Twentyfifteen, so obviously it’s a crossed wire in something I have done?

Laurena


Lorenzo Orlando Caum

  • Support Staff

May 6, 2015 at 10:08 am

Hi Laurena, Genesis works a little differently and we can help you get back on track.

Could you let us know all current changes that have been made regarding the templates?

For example, I added a single-espresso_events.php template to my child theme. Then I added some sample coding to my child theme’s functions.php to change the layout, etc.


Lorenzo


laurena

May 6, 2015 at 10:31 am

Hello there, and thanks for your help!

I added:
archive-espresso_events.php and
single-espresso_events.php according to the Genesis blog post https://eventespresso.com/wiki/build-custom-espresso-event-post-templates-genesis/ – but I stopped before “Venues and Taxonomy Archives” because there was no page content sample to copy and I am not quite “there” yet to create the relevant code.

I added the pagination function to my functions.php

I also added the following, from the Arabica file I found in the public folder of the core:
content-espresso_events-datetimes.php
content-espresso_events-details.php
content-espresso_events-header.php
content-espresso_events-thumbnail.php
content-espresso_events-tickets.php
content-espresso_events-venues.php
content-espresso_events.php
content-espresso_venues-details.php
content-espresso_venues-header.php
content-espresso_venues-location.php
content-espresso_venues-thumbnail.php
content-espresso_venues.php

I made a minor change to content-espresso_events.php to re-order the ticket selection to the bottom of a single event.

And I added a custom plugin with the following content:

add_action( ‘template_redirect’, ‘my_remove_ical_link’ );

function my_remove_ical_link() {
remove_filter( ‘FHEE__espresso_list_of_event_dates__datetime_html’, array( ‘EED_Ical’, ‘generate_add_to_iCal_button’ ), 10 );
}

// remove “powered by Event Espresso” admin footer text

add_filter( ‘admin_footer_text’, ‘ee_remove_footer_text’, 11 );

function ee_remove_footer_text() {
remove_filter( ‘admin_footer_text’, array( ‘EE_Admin’, ‘espresso_admin_footer’ ), 10 );
}

function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Register’ => ‘Sign up’,
‘Confirm and go to payment page’ => ‘Complete registration’,
‘No events available…’ => ‘No upcoming classes at this time…’,
‘Available Tickets’ => “Course Dates:”,
// Add some more strings here
);

// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}

return $translated;
}

add_filter( ‘gettext’, ‘mycustom_filter_gettext’, 10, 3 );


Lorenzo Orlando Caum

  • Support Staff

May 6, 2015 at 11:54 am

Thanks. I was able to see this on a test site.

Could you try renaming your existing content-espresso_events.php file and then moving this one into place?

http://cl.ly/code/3Z3L2X3L1a3V/content-espresso_events.php


Lorenzo


laurena

May 6, 2015 at 12:07 pm

Hi Lorenzo,

OK, that worked perfectly. I just moved the ticket selector to the bottom of the description in the “single” section. Thank you!!!

Laurena


Lorenzo Orlando Caum

  • Support Staff

May 6, 2015 at 2:06 pm

Glad to hear that worked. I’ll update this support post to resolved.

Thanks


Lorenzo

Viewing 7 reply threads

The support post ‘Duplicate Dates in Category List 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