• Resolved pixeloco

    (@stacybird)


    My theme has post-thumbnail support and I have a custom size defined that’s being used elsewhere throughout my site and need the event posts to match.

    How can I tell the featured image spit out by the event-single.twig file to use the desired custom image size? I’ve isolated the snippet but can’t figure out what to change:

    {{ event | avatar( [
    ‘post_thumbnail’,
    ‘location_avatar’,
    ‘category_avatar’
    ], ‘timely alignleft’, false ) | raw }}

    https://wordpress.org/plugins/all-in-one-event-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can’t now. Do it like this.
    Add this filter to app/view/event/avatar.php and then hook to this filter to modify size http://take.ms/6Me4e

    I will merge this into our next version

    Thread Starter pixeloco

    (@stacybird)

    I’ve added the line of code as instructed but could you please elaborate on how exactly to use it in the twig file? Still not sure where to include the custom size information.

    You have to hook to that filter and return the size and width you want. Add the filter in function.php in your theme. us the $event variable to get the post ID, from there you can get the custom fields i guess.
    I can’t help you much more than this as it becomes Custom Work more than support

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change size of featured image’ is closed to new replies.