Community Forums › Forums › Archived Forums › General Discussion › Duplicate image on post from media gallery? HELP
Tagged: child theme, duplicate, genesis, image, media gallery, streamline
- This topic has 16 replies, 5 voices, and was last updated 11 years ago by Brad Dalton.
-
AuthorPosts
-
October 22, 2013 at 7:21 pm #68312JenKleinMember
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/October 22, 2013 at 9:19 pm #68323nutsandboltsMemberYou 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/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 21, 2013 at 3:25 pm #74778chikamikuParticipantAndrea,
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
November 21, 2013 at 5:33 pm #74806nutsandboltsMemberCan you post a link to your site?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 22, 2013 at 4:56 am #74923chikamikuParticipantThank you again. The link is as follows. However, I was able to solve it by unchecking featured image in the theme settings area.
Thanks and best regards
November 25, 2013 at 12:36 am #75438smplcmplxityMemberI 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
November 25, 2013 at 12:40 am #75439nutsandboltsMemberHi 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/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 25, 2013 at 12:49 am #75444smplcmplxityMemberHi 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!
ChristineNovember 25, 2013 at 1:06 am #75446nutsandboltsMemberI'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/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 25, 2013 at 1:08 am #75447smplcmplxityMemberThat would be so great!! Thank you so much!!
Christine
November 30, 2013 at 4:57 pm #76336Brad DaltonParticipantSorry Andrea and Christine. Just saw this on Twitter and wanted to know if you resolved it?
December 2, 2013 at 12:31 pm #76634smplcmplxityMemberHi 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!
ChristineDecember 2, 2013 at 4:20 pm #76674Brad DaltonParticipantDecember 2, 2013 at 4:22 pm #76676smplcmplxityMemberI 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.
December 2, 2013 at 4:23 pm #76677nutsandboltsMemberShe's talking about the featured image, not the header.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 2, 2013 at 4:24 pm #76678smplcmplxityMemberSorry for the confusion...yes, I mean the featured image.
December 2, 2013 at 4:26 pm #76679Brad DaltonParticipant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.