Home › Forums › Calendar Products › Events Calendar PRO › Custom goodies for views/events-list-load-widget-display.php
- This topic has 5 replies, 3 voices, and was last updated 8 years, 9 months ago by Support Droid.
-
AuthorPosts
-
December 28, 2011 at 8:00 am #12700ChristopherParticipant
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
……..etcI 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? 😀
December 28, 2011 at 8:14 am #12701ChristopherParticipantA 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….
December 28, 2011 at 11:03 am #12709JonahParticipantHi 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,
JonahDecember 29, 2011 at 3:30 am #12722ChristopherParticipantThanks bud, I really appreciate the advice! I will give both a try and let you know what happens.
December 29, 2011 at 8:51 am #12727JonahParticipantSure 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.
July 2, 2015 at 5:00 pm #974960Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Custom goodies for views/events-list-load-widget-display.php’ is closed to new replies.