Display Event Pic in Tooltip

This topic contains 1 reply, has 1 voice, and was last updated by  Fabienne Freymadl 6 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43248

    Hi,

    I would very much like to display the event imagine in the tool tip on the full event, I did find this here, but i am unsure what the call for the image is:

    https://github.com/stephenharris/Event-Organiser/blob/6897b1f7137105b10822785a2e0d4c9f01027f8a/includes/event-organiser-ajax.php#L201

    Appreciate any hints!

    Thank you

    Fabienne Freymadl
    #43249

    I managed to do the following code – but it wont work (cache emptied).

    I added that code to the functions.php of my theme.

    `add_filter('eventorganiser_event_tooltip', 'my_callback_function', 10, 4);`
    
    function my_callback_function($description, $event_id, $occurrence_id, $post) { // Get the featured image URL for the post $featured_image = get_the_post_thumbnail_url($post->ID);
    
        // Check if a featured image is available
        if ($featured_image) {
            // If an image exists, create an HTML element to display it in the tooltip
            $description = 'post_title) . '">';
        } else {
            // If no image is available, set an empty string to clear the tooltip content
            $description = '';
        }
    
        return $description;
    
    
    }
    
    • This reply was modified 6 months, 2 weeks ago by  Fabienne Freymadl.
    Fabienne Freymadl
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.