Feature Image Blown Up

Hi.

I'm working with the Events + plugin. Here is my first test event: http://www.arizonaartsupply.com/events/2017/07/paint-with-dave/.

Notice that my featured image BLOWS up to take up the whole page. It is a 300x300 image. How do I set this so it does NOT blow up my featured image beyond it's standard dimensions?

Please advise.

  • Nahid

    Hey David !
    Hope you are having a great day!

    I can see your theme's stylesheet has some CSS to make the featured images take the full width of the container.

    Can you try the following CSS for the events pages?

    .single-incsub_event .blog-bazar .thumbnail .border img {
        width: auto;
    }

    Just add the code in your child theme stylesheet OR in the Custom CSS field in your Appearance>Customize. Make sure you clear all cache after the process.

    Let me know if this works for you. Thanks!

    Best,
    Nahid.

  • David

    Hi.

    I just tried uploading a BIG featured for my event but the image TRUNCATES.

    Please visit http://www.arizonaartsupply.com/events/2017/08/paint-with-dave-1/ for an example.

    NOTE: your css code is presently located at Bazar Child...Theme Options....Custom Codes.

    (As reported under another ticket, your installed plugin Custom CSS and JS no longer works)

    Note: the goal is to place an image as is or to take up the confines of the main panel of the events page. The image should not truncate.

    Please advise.

  • Nahid

    Hey David !
    Hope you are doing well today!

    Well, I checked your event page and it seems the image is not being truncated. It seems the image has been uploaded this way.

    Here's the image that was uploaded - https://i0.wp.com/www.arizonaartsupply.com/wp-content/uploads/AZartSupplyFLYER-201708-page-001-1-858x338.jpg

    And here's how I see it in the page -

    They actually look the same. Can you show me how it is actually supposed to look like?

    I'll be looking forward to hearing from you. Thanks!

    Best,
    Nahid.

  • David

    Hi.

    This is the image uploaded: http://www.arizonaartsupply.com/wp-content/uploads/AZartSupplyFLYER-201708-page-001-1.jpg

    Please refer to this screencast: https://www.screencast.com/t/WLej0ZDXzC
    If you edit the event "Paint with Dave" and look at the preview of the featured image it is a full size image. If you click on it and look at it in the media library, it is a full size image.

    The image only displays as truncated on the event page, It is not uploaded as a truncated image.

    I have opened up access to the site for WPMU support

    As a side note: the permalink and the ability to preview the event is now missing? The permalink loads and then disappears (refer to end of screencast).

    Please advise.

  • Nahid

    Hey David !
    Hope you are doing well!

    Please excuse my late response as we had to do a lot of testing and diagnosing in your site and here's what I discovered. Well, this issue is just not happening on the single event templates but also any post types including general blog posts. You can check this blog post out (it's working now after the workaround though), I've made it Private so it doesn't show up for your live users/visitors and you need to log in as administrator to view it. So it is not an Events+ centric problem.

    It is a default functionality of WordPress that it prepares different sizes of your media files (images) and uses them in your posts. So we came up with an workaround adding the following to the functions.php of your child theme :

    add_filter( 'wp_get_attachment_image_src', function( $image, $attachment_id, $size, $icon ){
    
        $size = 'full';
        $image = image_downsize( $attachment_id, $size );
        if ( ! $image ) {
            $src = false;
    
            if ( $icon && $src = wp_mime_type_icon( $attachment_id ) ) {
    
                $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
    
                $src_file = $icon_dir . '/' . wp_basename( $src );
                @list( $width, $height ) = getimagesize( $src_file );
            }
    
            if ( $src && $width && $height ) {
                $image = array( $src, $width, $height );
            }
        }
    
        return $image;
    }, 10, 4 );

    That did work for the default WordPress themes, but unfortunately, not for your theme as it is not using the featured images as themes generally should.

    So, this time, we went checking your theme out and found a solution. The workaround has been used in your child theme so you shouldn't have any issues updating your theme. Although it is working fine now, I'd recommend you to get back to the theme developers and let them know about it. To address the change we made, we just overrode the post formats in wp-content/themes/bazar/theme/templates/blog/bazar/post-formats in the same directory in your child theme and changed :

    yit_image( 'size=blog_bazar' );

    To:

    the_post_thumbnail( 'full' );

    Hope this helps. Let me know if you need any further assistance regarding this. Thanks!

    Best,
    Nahid.

  • David

    Hi.

    Thank you for your continued participation. I tested the recurring event scenario and see the full size image in full. Great.

    NOTE: I went to functions.php for the Bazar child theme but do not "see" your code? I also don't see it in the bazar parent file for functions.php. Please advise on its location.

    (note, I searched for "wp_get_attachment_image_src" and don't see the code in place)

    NOTE2: I went to /public_html/wp-content/themes/bazar-child/theme/templates/blog/bazar/post-formats and noticed that there are 5 php files in the folder for post-formats. Which file did you modify?

    NOTE3: there still is an issue with the permalink for a recurring event disappearing from the top of the page upon full load of the event in edit mode. There is also no preview button for recurring events in edit event mode for event.

    Refer to screencast: https://www.screencast.com/t/m7dcRooBth.

    Please advise on all 3 notes.

  • Nahid

    Hey David !
    Hope you are doing well today! I'm really sorry about the delay here as I was still checking the third issue.

    Regarding Note#1, I haven't added any code to your functions.php. We came up with a code but it didn't work for your theme.

    Regarding Note#2, in /public_html/wp-content/themes/bazar-child/theme/templates/blog/bazar/post-formats, I modified all the 5 files and replaced :

    yit_image( 'size=blog_bazar' );

    With:

    the_post_thumbnail( 'full' );

    I'm still checking the issue from Note#3 and I'll get back to you as soon as possible. Thanks!

    Best regards,
    Nahid

  • Nahid

    Hey David !
    Hope you are doing well today and I apologize about the heavy delay here!

    Regarding Note#3, I was able to replicate the issue on my end and got the feedback from the developers about this. Unfortunately, this is the way the plugin works (for now). The permalinks are not editable; and not visible for recurring events. The 'Preview' option for the Events is not available either. However, you can change the 'Slug' of the events by enabling the 'Slug' option from 'Screen Options'. Here's a screenshot for reference:

    Well, this can be a very effective Feature Request for the plugin, that's why I've opened a new ticket under the 'Features and Feedback' section in our Forums so that other members can recommend this as well.

    Best regards,
    Nahid

  • Nahid

    Hey David !
    Hope you are doing well today!

    I can see you have already replied to that ticket. So, you'll receive automatic updates to future responses. Moreover, just for future reference, you can also click on the 'Subscribe to this topic' button for email notifications from selected topics. Here's a screenshot for reference:

    Thank you for your patience, consideration and for being with us!

    Best,
    Nahid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.