Featured image problem

Community Forums Forums Design Tips and Tricks Featured image problem

This topic is: not resolved

This topic contains 11 replies, has 5 voices, and was last updated by  Zell 1 year, 4 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #36685

    Zell
    Participant
    Post count: 5

    Hi there,

    I’m having problems with the featured image function in Genesis and I’m working on creating a new child theme by modifying the function files.

    Here’s what I want to achieve:

    1) Display the featured thumbnail (150×150) on the blog page
    2) Ensure that tags are not stripped on the blog page.
    3) Display the full featured thumbnail on the post page (full size)

    Heres what I’m currently doing to avoid the problem

    I’ve tried setting up Featured Image in Admin > Genesis > Theme Settings > Content Archives to allow featured images. However, this setting does not allow me to have a full width image on my post.

    Also, if I set to allow featured images and I place an full width image on the top of my post before the <!– more –> tag, I have to set content limit to 1000 characters to prevent two pictures from showing up on my blog page. And this settings results in stripped tags.

    Can I get any help here? Thanks!

    Here’s my website for reference: http://www.zell-weekeat.com

    http://www.zell-weekeat.com
    #36825

    Zell
    Participant
    Post count: 5

    Help anyone?

    Thanks!

    #37096

    weslinda
    Participant
    Post count: 193

    A few questions for you.

    1. Is the thumbnail a cut of the larger featured image? Basically, you are using the same image for the thumbnail and the featured image on the post?
    2. When you share that you are displaying the full featured thumbnail on the post page, are you doing this by inserting it into the post or calling it as a featured image? So it’s added automatically?

    Also, you mention needing to limit to 1000 characters because of stripping formatting. It might be easier to use Excerpt for the blog archive, as that will allow you to set specific content to show on that page for each post, with no concern of image conflicts.


    Loving the Genesis Life!

    #37097

    UT Mod
    Participant
    Post count: 159

    Have you tried registering the image size of 150X150 first in the functions.php and then setting that size in your Admin > Genesis > Theme Settings > Content Archive to get the result.

    You may use this -

    `add_image_size( ‘custom-home’, 150, 150, TRUE );`

    reference -

    add_image_size

    #37103

    UT Mod
    Participant
    Post count: 159

    Ok, referring to my above comment, I forgot that the 150 by 150 size is pre-defined with the name thumbnail in the settings. I would suggest you the steps pointed by @weslinda, as if you want the same image to show up on single and blog page then you may not need featured image option to be used.

    Else, you can simply upload any image (150 by 150 in your case) in featured image section of post, when you do not want to show the main image of the post but some different image.

    • This reply was modified 1 year, 4 months ago by  UT Mod.
    • This reply was modified 1 year, 4 months ago by  UT Mod.
    #37125

    surefirewebserv
    Participant
    Post count: 69

    Here you go, straight from my blog. This snippet will fix your duplicate image issues…

    [php]add_filter(‘the_content’,’wpi_image_content_filter’,11);

    function wpi_image_content_filter($content){

    if (is_home() || is_front_page()){
    $content = preg_replace("/<img[^>]+\>/i", "", $content);
    }

    return $content;
    }[/php]

    You can change the conditionals to anything you want. Currently they’re targeting the homepage.


    SureFireWebServices.com | Genesis Tuts and More
    Genesis Theme Starter Kit | It’s Free

    #37149

    Zell
    Participant
    Post count: 5

    Hey everyone, thanks for chipping in to help me with this problem.

    1. Is the thumbnail a cut of the larger featured image? Basically, you are using the same image for the thumbnail and the featured image on the post?
    2. When you share that you are displaying the full featured thumbnail on the post page, are you doing this by inserting it into the post or calling it as a featured image? So it’s added automatically?

    1) Yes basically the thumbnail is a miniature sized version of the large image that I intend to put as the main image of the blog post.
    2) I’m calling inserting it manually at the moment. Ideally, I’m looking for a solution to set a featured image that automatically insert the full sized image at the top of my post, and a thumbnail version at the blog template page.

    Limiting the content to 1000 characters resulted in stripped formatting, but when I used blog excerpts instead, the “Read More” link doesn’t appear. Instead, its replaced by 3 ellipses that doesn’t link to anything.

    So in summary, I would ideally want it to

    1) Show featured image (full) on post
    2) Show featured thumbnail (150 x 150) on blog template (the images are from the same image and just included once with featured image)
    3) Ensure there is no stripped tag
    @vajrasar:
    I’m currently using the featured image checkbox under Admin > Genesis > Theme Settings > Content Archives and I’ve set it to 150×150.

    @surefirewebserv:
    Thanks for the snippet! I’m not too sure I understand how to use it though. Can I get a quick explanation on this snippet and how should I use it?

    Also, does anyone want me to put up my functions.php file?

    Thanks all!

    Zell

    #37195

    jiversen
    Participant
    Post count: 10

    This link may help you for the “…” issue when using an excerpt :http://codex.wordpress.org/Function_Reference/the_excerpt

    Here is the snippet you probably want:
    For versions 2.9 and higher of WordPress
    By default, excerpt more string at the end is set to ‘[...]‘. To change excerpt more string using excerpt_more filter, add the following code to functions.php file in your theme:

    function new_excerpt_more( $more ) {
    	return '[.....]';
    }
    add_filter('excerpt_more', 'new_excerpt_more');
    #37304

    Zell
    Participant
    Post count: 5

    @jiversen

    Thanks for chipping in. I’ve tried that option as well, and its not what I was looking for.

    I’m looking to manually insert the “read more” link in the post itself, and I don’t want to limit the post excerpt a certain amount of characters. The except_more filter doesn’t allow me to do so.

    Guys I really appreciate the help here!

    #37841

    Zell
    Participant
    Post count: 5

    Hi there, I’ve tested with using excerpt.

    The problem with using excerpt is that I wont be able to put the “Read more” tag right where i want the text to break. If i modify the excerpt length to say, 800, I don’t even get to see the “Read more” link.

     

    Some help please?

    #38444

    weslinda
    Participant
    Post count: 193

    That’s the function that excerpt brings to the table, so there aren’t a ton of “read more” links.  If you feel you want those, you could do a simple custom bit of code to add the “read more” link if you wanted. Probably the easiest way to solve this.


    Loving the Genesis Life!

    #38493

    Zell
    Participant
    Post count: 5

    @ weslinda

    How would such a custom bit of code look like? Do I hook it on to “genesis_after_post_content”? 

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.