New Landing How can we help? Cardinal First image in post not displaying in post grid

Viewing 15 posts - 1 through 15 (of 18 total)
  • Posted in: Cardinal
  • #88488
    cmwwebfx
    Member
    Post count: 30

    Hi Ed and team,

    I have whipped up a quick demo to see how the news stories will display for our new client. And the issue I am seeing right away is the first image in the post is not coming through on the grid layout. I am not sure if there was a setting or tick box to have these images show.

    Ed I remember yesterday you mentioned that this was in the latest update for the first image to be pulled into the Grid. Can you please confirm this as the images are not coming through.

    – Ciaran

    #88590
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Ciaran,

    With the first image in the post, I was referring to the RSS feed, which I’m pretty sure was what you were asking about?

    This is something we could provide a workaround for though, I’ll see what I can do to make it a child theme function so that you don’t have to worry about updates.

    – Ed

    #88595
    cmwwebfx
    Member
    Post count: 30

    Hi Ed,

    Yes you are right about it being for RSS. however I didn’t realise that it wouldn’t show the images in the grid layout. That will be great if you have a workaround function for the child theme. I will test out the feed tomorrow when back in the office for Campaign Monitor. Will keep you updated on that progress.

    – Ciaran

    #88775
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Ciaran,

    Just implemented a filter for the post thumbnail image, so that we can use the same code that you’ll use for the RSS feed image. For reference, it should simply be this:

    function custom_post_thumb_image($thumb_img_url) {
        
        if ($thumb_img_url != "") {
        	global $post;
      	ob_start();
      	ob_end_clean();
      	$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
      	$thumb_img_url = $matches[1][0];
        }
        
        return $thumb_img_url;
    }
    add_filter( 'sf_post_thumb_image_url', 'custom_post_thumb_image' );

    – Ed

    #88791
    cmwwebfx
    Member
    Post count: 30

    Hi Ed,

    I have added this to the child theme functions.php, but does not pull up the images for some reason.
    http://cm.fullerdemo.com.au/campaigns/

    I have just ticked the box to make you super admin on the Multisite. I am sure that would have helped if I had done that from the start.

    #88798
    Swift Ideas – Ed
    Keymaster
    Post count: 15264
    This reply has been marked as private.
    #88809
    cmwwebfx
    Member
    Post count: 30

    Hi Ed,

    I have downloaded and updated to the latest build as per the link you have provided. is there a new setting somewhere that I am to tick to make the first image show? The first images do show great on the RSS as I have just tested that, but cannot see them on the grid layout.

    #88813
    Swift Ideas – Ed
    Keymaster
    Post count: 15264
    This reply has been marked as private.
    #88814
    cmwwebfx
    Member
    Post count: 30

    Uploading the latest build now, and will add that snippet to the child functions.php
    Will follow up shortly.

    #88815
    cmwwebfx
    Member
    Post count: 30

    Hi Ed,

    oh we are so nearly there. I have updated the theme to latest build, added the snippet to child theme, and presto the images are showing. However the video auto thumbnails are not coming through. you can see this in the 4th post on my demo news site. http://cm.fullerdemo.com.au/campaigns/

    #88931
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Ciaran,

    Glad that’s working now! Ok, so you’re expecting the video thumbnails to pull from the first video in the page too? That might be a little more tricky…

    – Ed

    #89033
    cmwwebfx
    Member
    Post count: 30

    Hi Ed,

    Please note, I never expect things, but yes, I was hoping it would have brought in the preview thumb image that is rendered automatically by vimeo and youtube with that code supplied.

    #89038
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Ahh ok. Unfortunately that would require quite a lot of custom code. To get the screenshot/thumbnail requires using the Vimeo/YouTube APIs as far as I’m aware. I’ve had a quick look and found these, something that you may be able to look into if you have the time/skills?

    http://www.soapboxdave.com/2010/04/getting-the-vimeo-thumbnail/
    http://stackoverflow.com/questions/18676534/generate-youtube-thumbnail-from-embed-code-using-php

    – Ed

    #89039
    cmwwebfx
    Member
    Post count: 30

    No issue at all, will you add the code to the next version of update? if so I will provide it. I have done it for one of our other news sites with genesis framework. I will be happy to provide the code if you don’t mind checking over it for submission to the update?

    I am sure others will benefit from this as it is typical for news sites that have videos to display as thumbs in the grid.

    #89042
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Of course! I haven’t decided the best way to go with these child theme functions, but I think it may be best if we add these to the knowledgebase so that they are searchable, and users can add what they need. I think that would be the best solution rather than integrating directly within the theme.

    I think if it gets to the case where more than a few people are asking after it, then we will add it into the theme build.

    Thanks,

    – Ed

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register