Duplicate image on post from media gallery? HELP

Community Forums Forums General Discussion Duplicate image on post from media gallery? HELP

This topic is: not resolved

This topic contains 16 replies, has 5 voices, and was last updated by  braddalton 12 months ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #68312

    JenKlein
    Member

    When I post to my blog and insert an image from the media gallery. The 3/4 of the media is showing at the top of my post. It’s a jpg and I have the featured image unchecked. I’ve tried several things and nothing is working consistently. Here’s a broken post so you can see what I mean http://jenklein.com/roseville-and-rocklin-real-estate-scoop-for-september. I had someone look at it today and he simply added a space in the title between the dates and that fixed it, here’s a good one. http://jenklein.com/roseville-and-rocklin-real-estate-scoop-for-sept-13-oct-13. As I look through my very beginning posts I see the duplicate image as well, which leads me back to the featured image, but I don’t know what to do from there. I’m not super savvy, so please help!

    http://jenklein.com/
    #68323

    nutsandbolts
    Keymaster
    Post count: 3187

    You can remove the featured image function completely if you don’t want to use it – that’s probably the easiest way to take care of the problem. Under Appearance > Editor, click on functions.php in the upper right, select all, and paste it into a blank text document (this is so you have a complete functions.php in case something gets broken).

    Once you’ve done that, scroll down until you see this:

    /** Add post image above post title */
    add_action( 'genesis_before_post', 'streamline_post_image' );
    function streamline_post_image() {
    
    	if ( is_page() ) return;
    
    	if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) {
    		printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
    	}
    
    }

    Remove every bit of that (be careful not to remove anything else) and save. Now no post will show a featured image no matter what. If anything breaks, you will have to log into CPanel or access your files via FTP to paste the old functions.php back in, so be prepared for that!

    Hope that helps.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #74778

    chikamiku
    Participant
    Post count: 77

    Andrea,

    I have the same problem. Whenever I adda post, the image shows up twice. I am using agency theme. I tried to find the code in its functions.php file. But did not find the code. Could you please suggest any alternative to this?

    Thanks

    #74806

    nutsandbolts
    Keymaster
    Post count: 3187

    Can you post a link to your site?


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #74923

    chikamiku
    Participant
    Post count: 77

    Thank you again. The link is as follows. However, I was able to solve it by unchecking featured image in the theme settings area.

    http://www.exoticskins.jp

    Thanks and best regards

    #75438

    smplcmplxity
    Participant
    Post count: 10

    I am having the same issue but with the Streamline theme. It was working fine but now all of the sudden when I place an image in the body of the post it is automatically placed as the featured image (large image header of blog post). It doesn’t show the photo in the “Set Featured Image” area so I can’t remove it from there. Even if I delete the image from the body of the post the featured header image still appears. I checked the Theme Settings but my featured image is unchecked already.

    Very frustrating and I know my client will go crazy over this. HELP!!!!

    Here’s an example (I don’t want the large image there…just the small image in the body):

    http://www.rachellacey.com/would-you-like-some-whiskey-with-your-spy-tools-mr-mayor/

    Christine

    #75439

    nutsandbolts
    Keymaster
    Post count: 3187

    Hi Christine,

    Streamline has a function to automatically pull either the featured image or the first post image to display above the post. To get rid of it, find the following in functions.php and remove it:

    /** Add post image above post title */
    add_action( 'genesis_before_post', 'streamline_post_image' );
    function streamline_post_image() {
    
    	if ( is_page() ) return;
    
    	if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) {
    		printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
    	}
    
    }

    A word of caution – be sure you have FTP or CPanel access in case this breaks the site. It shouldn’t – I remove functions all the time – but if you accidentally miss a bracket or something, it can throw a PHP error and you’ll have to edit the file via FTP/CPanel to fix it.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #75444

    smplcmplxity
    Participant
    Post count: 10

    Hi Andrea!

    I just removed that code but it removed all of the Featured images as well. I tried placing them back in the posts but still didn’t show. I want to be able to set the Featured image if I want to but I want the option of placing an image just in the body of the post (without it being in the featured image header).

    Thanks!
    Christine

    #75446

    nutsandbolts
    Keymaster
    Post count: 3187

    I’m going to ping @braddalton on this one – he has worked with Streamline quite a bit more than I have so he may have a code snippet handy to help with that.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #75447

    smplcmplxity
    Participant
    Post count: 10

    That would be so great!! Thank you so much!!

    Christine

    #76336

    braddalton
    Participant
    Post count: 10594

    Sorry Andrea and Christine. Just saw this on Twitter and wanted to know if you resolved it?


    #76634

    smplcmplxity
    Participant
    Post count: 10

    Hi Brad!

    Nope, I haven’t resolved this. I want to be able to use the blog header image if I want to but be able to choose not to use it as well and just have text only or images that are displayed like normal blog images inside the blog text itself.

    In the Streamline demo it is shown that you can have it that way. The first post with the header image and text, the second with the header image and also an image in the blog text and the third with no header image but an image in the blog text.

    http://demo.studiopress.com/streamline/templates/blog/

    Thank!
    Christine

    #76674

    braddalton
    Participant
    Post count: 10594

    Sorry but i don’t really understand what you need.


    #76676

    smplcmplxity
    Participant
    Post count: 10

    I need to be able to use the blog header if I want but not to use it if I don’t want to.

    My client likes to use the blog header image only sometimes but used a lot of images throughout her blog. She is unable to take the blog header image out…it just automatically grabs the first image she put in her blog and places it as the blog header.

    #76677

    nutsandbolts
    Keymaster
    Post count: 3187

    She’s talking about the featured image, not the header.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

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

You must be logged in to reply to this topic.