Support

Home Forums Event Espresso Premium remove link from post thumbinail

remove link from post thumbinail

Posted: August 26, 2015 at 6:41 am

Viewing 5 reply threads


sergio Pannella

August 26, 2015 at 6:41 am

how can I remove links to single events from post thumbinail of Events List?

Thank you


Lorenzo Orlando Caum

  • Support Staff

August 26, 2015 at 6:58 am

Hi there Sergio,

You can make this change by removing the link to the post which is in one of the content template files.

Step 1) Login to your WordPress root with your preferred SFTP or FTP client. Filezilla and Cyberduck are free options.

Step 2) Browse to this location:

/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014

Step 3) Look for the content-espresso_events-thumbnail.php file and download a copy of the file to your computer. Then upload a copy of the file to your child theme folder:

/wp-content/themes/yourchildthemefolder

If you do not have a child theme in use, then upload to this location:

/wp-content/uploads/espresso/templates

Step 4) Next, open the content-espresso_events-thumbnail.php file for editing. At about line 12, you’ll see the link to the post as part of a href:

http://cl.ly/image/0I293Z3K1F0o

Remove it including the closing href tag and then save changes:

http://cl.ly/image/1V330h2O3L1t


Lorenzo


sergio Pannella

August 26, 2015 at 8:02 am

Thank you Lorenzo, but i don’t have this path:”/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014″. i use EE3 without “EE core “


Tony

  • Support Staff

August 26, 2015 at 12:56 pm

Hi Sergio,

Is this from the event list or another page?

Can you provide a link so we can see exactly which output you want to remove the link from please?


sergio Pannella

August 28, 2015 at 1:36 am

Hello Tony, the problem is that some events must be forwarded to external web sites, it works with Title, but not with the post thumbnail , so I want to remove the link for post thumbnails.

http://www.pov-int.eu/news/pov-int-eu-nightlight-newsletter-august-2015-sergios-test/

For example: on the right column “Frankfurt – Gemeinsam in ein höheres Bewusstsein”


Dean

August 28, 2015 at 4:25 am

Hi,

In EE3, you have two choices.

1) Copy these files

/wp-content/plugins/event-espresso/templates/event_list.php
/wp-content/plugins/event-espresso/templates/event_list_display.php

(copying both is important)

over to wp-content/uploads/espresso/templates

Then edit the event_list_display.php to change

echo apply_filters('filter_hook_espresso_display_featured_image', $event_id, !empty($event_meta['event_thumbnail_url']) ? $event_meta['event_thumbnail_url'] : '');

to

echo '<div class="ee-featured-image" id="espresso_featured_image-'.$event_id.'"><img src="' . $event_meta['event_thumbnail_url'] .'" /></div>';

2) The following function doesn’t remove the link, but you can change the URL

function change_image_link($event_id, $url) {
$url = "#";
return;

}
add_filter('filter_hook_espresso_display_featured_image', 'change_image_link', 10, 2);

That code can be added to a site specific plugin: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Viewing 5 reply threads

The support post ‘remove link from post thumbinail’ 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