How to insert an image (thumbnail) in countdown widget ?

Home Forums Calendar Products Events Calendar PRO How to insert an image (thumbnail) in countdown widget ?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1107088
    Laurent Lecler
    Participant

    Hello,
    how can i insert the thumbnail of the event in the countdown widget (above the title and the counter if possible) ?
    I’ve made it for the event-list widget and works fine…
    http://www.grizette.com/agenda/

    Thx great team πŸ˜‰

    #1107248
    George
    Participant

    Hey @Laurent,

    You can modify the Countdown Widget’s contents by making a custom widget template using the principles outlined in this guide β†’ https://theeventscalendar.com/knowledgebase/themers-guide/

    Head into your plugin files for Events Calendar Pro, to the file located at /src/views/pro/widgets/countdown-widget.php

    Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/widgets/countdown-widget.php, and then add images and all other customizations you want to make here! πŸ™‚

    Cheers,
    George

    #1107286
    Laurent Lecler
    Participant

    Thanks Georges,

    I already know all this, it’s writen in the knowledge base…

    The problem is that i don’t know what code i can put in the countdown-widget.php to achieve what i want to have :
    Displaying the image of the event !

    #1107501
    George
    Participant

    Hey Laurent,

    Thanks for the follow-up!

    When it comes to writing code, you unfortunately have to do this yourself because we can not help with writing code. You can learn more about this here β†’ https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/

    If you are not able to write the code yourself, your best option is to hire a developer to do so for you.


    Now, all this being said, adding the “Featured image” of the event is a bit simple. Once you have your custom version of the countdown-widget.php file going, try adding code like this inside that file:

    <?php echo tribe_event_featured_image( $event->ID ); ?>

    A full example version of this file is located in a Gist I made for you here β†’ https://git.io/vwVGN

    You’ll have to take the code from there and tinker and style things how you want; but I hope this helps!

    Sincerely,
    George

    #1107668
    Laurent Lecler
    Participant

    Hi Georges,
    you’re very kind with me (and all your customers because this would be great to have this option without coding)

    The code is ok but it gives a false URL to the image (url of the last post in the page).
    Can you give me the code for liking the event URL to the image ?

    Or perhaps it would be better to insert the code you provide me in the event title (wich have a valid link to the event) instead of in the countdown itself ?

    Thank you very much for your time, sure you’ll be proud to showcase our site in near future πŸ˜‰

    You can see the code in action here in the side bar : http://www.grizette.com/news-buzz/

    #1108000
    George
    Participant

    Hey Laurent!

    I unfortunately cannot help with any other coding. Please read this page to learn what we can help with β†’ https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/

    To further realize the customizations you want, you would have to write that custom code or hire a professional developer to do it for you. We have a list of great developers here β†’ http://m.tri.be/18k1 (we have no affiliation with any of these folksβ€”they’re simply some well-respected names in the community that we’ve compiled to share).

    Best of luck with your tinkering,
    George

    #1108160
    Laurent Lecler
    Participant

    Ok Georges,

    I didn’t thought it was so difficult to achieve that…
    So the code you gave me is impossible to use !
    Nevermind i’ll not use the countdown widget.

    I suggest that the team work on the widgets to extend them with images (countdown, eventlist…).
    As you certainly know the net is becoming more and more visual.
    The big interest in a countdown is to give the focus to an event so the image is needed, the title is not enouth.

    Or perhaps you can publish a little tutorial in the knowledgebase like the one you made for Adding thumbnails to upcoming events List Widget πŸ˜‰

    Thanks for your assistance

    #1108551
    George
    Participant

    That’s a great tip, @Laurent, and I’m sorry about the outcome of this thread. When I try the code modification that I suggested above, it works fine for me, so I am not sure why it’s not working for you. Sorry for the trouble!

    Sincerely,
    George

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How to insert an image (thumbnail) in countdown widget ?’ is closed to new replies.