How to totally remove image from the display of events using event_list widget

Home Forums Calendar Products Events Calendar PRO How to totally remove image from the display of events using event_list widget

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #76590
    tmbond
    Participant

    Hello,
    Kindly help. I do not want to display any featured image or other image when I display the widget value of event_list in a page. All I want to do is show Title and date of event. Any help would be very appreciated. Please kindly provide a step by step of what to do. I looked in the code but could not find any info that would point me to images or thumbnails. Thanks.

    #76654
    Barry
    Member

    Hi tmbond,

    So I think you mean you want to remove featured images from the list view, is that correct? If so please check out our Themer’s Guide for an overview of how to customize The Events Calendar. Essentially though you probably want to locate and remove the following line in the list/single-event.php template:

    <?php echo tribe_event_featured_image( null, 'medium' ) ?>

    Hope that helps!

    #76688
    tmbond
    Participant

    Hi Barry. Thanks for your response. But no, that’s not what I mean. I want to remove the image only from the event list in widget display, not from any where else. I have looked in the widget related files for the event list widget but could not find any reference to image or thumbnail

    #76697
    snorton
    Participant

    In your theme folder, create a directory named ‘tribe-events’ and within that an additional directory named ‘widgets.’ This is where you will want to place a copy of the file ‘list-widget.php’ (which can be found here: \wp-content\plugins\the-events-calendar\views\widgets\list-widget.php)

    The kind folks at Modern Tribe have made it super easy to customize the template files for all different views by following very similar steps as I’ve just outlined.

    From here, simply modify the list-widget.php file to display exactly what you want, how you want it.

    Here’s a very simply implementation of this:
    http://pastebin.com/kH48FUBf

    This will output the title and start date & time of the event in the list widget. You can format the tribe_get_start_date() to display without the time by simply changing that part to this:

    tribe_get_start_date(null,false)

    or, if you want to specify the date format completely:

    tribe_get_start_date(null, false, $format = ‘M d,y’) <– modify the format using standard php syntax

    You could also essentially filter the output of the entire string via your functions.php file with the tribe_event_format_date template tag (http://docs.tri.be/Events-Calendar/function-tribe_event_format_date.html).

    #76786
    tmbond
    Participant

    Snorton, a bunch of thanks. This totally solved my problem.

    #76930
    Kelly
    Participant

    That’s great news, tmbond. 🙂 Snorton, thanks so much for your help!

    #982034
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘How to totally remove image from the display of events using event_list widget’ is closed to new replies.