Custom goodies for views/events-list-load-widget-display.php

Home Forums Calendar Products Events Calendar PRO Custom goodies for views/events-list-load-widget-display.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12700
    Christopher
    Participant

    Hi guys,
    Having followed: https://theeventscalendar.com/how-to-completely-customize-widgets
    I have managed to add the featured thumbnail (although it’s way too large) which I’m happy with. I’ll fight with the size (tips welcome!) at a later stage.

    What I would like to do is add a couple options to the widget’s options. At present there are fields like:
    Start Date & Time
    End Date & Time
    Venue
    Address
    ……..etc

    I would like to make a couple custom ones, and then display them in the widget. Basically to achieve a ‘custom’ excerpt for each event. The reason I don’t want to just pull the excerpt is because I will want it to say something different that what will show up in the calandar grid view.

    Any suggestions / tips? 😀

    #12701
    Christopher
    Participant

    A thought, you know what might work is pulling one of the ‘Custom Event Attributes’? Speaking of which (and I feel pretty retarded for asking this..) but where is this section when creating / editing an event?

    I have The Events Calendar (installed and activated on Version 2.0.2) as well as the Events Calendar PRO (also installed and activated on Version 2.0.2). WP v3.3

    I can see the advanced widgets but no ‘Custom Event Attributes’. Too much sugar over the Christmas season I reckon….

    #12709
    Jonah
    Participant

    Hi Christopher,

    If you want to use a different thumbnail size you have two options:

    1. Add a new image size in WordPress and use that instead.
    2. Use Timthumb or another dynamic image resizing script to resize on the fly.

    I would suggest using Advanced Custom Fields (http://wordpress.org/extend/plugins/advanced-custom-fields/) for your custom fields. The plugin let’s you display your custom fields only on certain post types so you can assign it to just your events post type.

    Then, in the widget display code you can just echo the field like so:


    echo get_field('event_excerpts', $post->ID);

    Change event_excerpts to whatever you assign for your custom field. You may need to change $post->ID too to pass in the event ID as assigned in the widget – I think $post->ID will work though.

    Now getting an actual checkbox for this new field in the widget options is another thing… But maybe you don’t actually need this 🙂

    I hope that helps,
    Jonah

    #12722
    Christopher
    Participant

    Thanks bud, I really appreciate the advice! I will give both a try and let you know what happens.

    #12727
    Jonah
    Participant

    Sure Christopher, you’re welcome! The Advanced Custom Fields website has a bunch of great documentation too if you get stuck… But I’d be happy to provide some more pointers as well. Let me know.

    #974960
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Custom goodies for views/events-list-load-widget-display.php’ is closed to new replies.