Support

Home Forums Event Espresso Premium Event_ID is displayed above the Description on version 3.1.29.P

Event_ID is displayed above the Description on version 3.1.29.P

Posted: December 6, 2012 at 12:24 pm

Viewing 7 reply threads


Dave Wilkinson

December 6, 2012 at 12:24 pm

$event_id is displayed above the Description on version 3.1.29.P

Viewing the event shows the event id at the top of the page above Description:

How can I remove it, cant find it in the code.

Also add to calendar does not appear. or will this appear when you upgrade to the new WP version?


Josh

  • Support Staff

December 6, 2012 at 12:29 pm

Hi Dave,

Can you post a screenshot or a link to the page where this is happening?

Please see the section of the 3.1.29.P blog post to answer your question about the add to calendar feature:
https://eventespresso.com/blog/#ical


Dave Wilkinson

December 6, 2012 at 12:33 pm

enter image description here


Dave Wilkinson

December 6, 2012 at 1:10 pm

enter image description here


Josh

  • Support Staff

December 6, 2012 at 1:32 pm

Hi Dave,

It looks like the event ID is getting printed from this code in registration_page_display.php:

<?php //Featured image
        echo apply_filters('filter_hook_espresso_display_featured_image', $event_id, !empty($event_meta['event_thumbnail_url']) ? $event_meta['event_thumbnail_url'] : '');?>

One of two things should happen when this code is run:

1) It should display a featured image if there’s a featured image set in the event and the new featured image option is enable in Event Espresso>Template settings

-or-

2) Nothing will be displayed there if the featured image option is disabled.

One thing that you can check and verify that it’s there is the new featured image function in /includes/functions/main.php. It will look like this:

if (!function_exists('espresso_display_featured_image')) {
    function espresso_display_featured_image($event_id, $image_url, $class = '', $title = '') {
        global $org_options;
        if ( !empty($org_options['display_featured_image']) && $org_options['display_featured_image'] == 'N' || !isset($org_options['display_featured_image']) ){
            return;
        }
        $class = empty($class) ? 'ee-featured-image' : $class;
        $title = empty($title) ? __('Featured Image', 'event_espresso') : $title;
        $align = empty($align) ? 'right' : $align;
        $output = '<div class="' . $class . '" id="espresso_featured_image-'.$event_id.'"><img title="' . $title . '" src="'.$image_url.'" /></div>';
        return $output; 
    }
}
add_filter('filter_hook_espresso_display_featured_image', 'espresso_display_featured_image',100,5);

If it’s not there, then it may be that the update didn’t update all the files, and uploading a fresh copy of Event Espresso will resolve this. You can download the latest version of Event Espresso from your account page.


Dave Wilkinson

December 7, 2012 at 12:14 am

Morning,
Both files have the code listed above.
I have updated to 3.1.29.1p – same issue.

I have “Display featured images in the event list and registration pages?” set as No.

I will just remark the code from registration_page_display.php so it doesn’t display.


Dave Wilkinson

December 7, 2012 at 12:23 am

Strangely enough I have commented out the lines in both files and it still shows :/

line 1281-1294 remarked in main.php
line 23 remarked in registration_page_display.php


Josh

  • Support Staff

December 7, 2012 at 12:40 pm

Hi Dave,

This indicates that there are out of date template files (from a prior version of Event Espresso) in the /wp-content/uploads/espresso/templates/ directory.

If you have modified templates in there, they need to be updated to use the new template files included with the current version of the plugin.

If you haven’t made any modifications to the files in the /uploads/espresso/templates they can be removed. If you are not sure if there were modifications made to these files, you can back these up or rename that folder just in case.

You can automatically rename the /wp-content/uploads/espresso/templates folder by going to Event Espresso>Template Settings and clicking the “Rename templates directory” button near the bottom of the page.

Viewing 7 reply threads

The support post ‘Event_ID is displayed above the Description on version 3.1.29.P’ 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