Community Forums › Forums › Archived Forums › Design Tips and Tricks › Double images on the Home Page of DECOR
Tagged: decor double images
- This topic has 7 replies, 4 voices, and was last updated 11 years ago by scoe.
-
AuthorPosts
-
March 7, 2013 at 3:35 pm #24871mikemuellerParticipant
Yet another baffling mystery...
Using DECOR the home page pulls an image and then pulls it again for a thumbnail.
The image doesn't have to be set as the featured image.Here's the site: http://thedejavuboutique.com/
I'd prefer only 1 image to show on the homepage, preferably the top (larger) image.
Any ideas?
MM
March 7, 2013 at 7:12 pm #24910Brad DaltonParticipantThis can happen when you insert the same image in a post and then also set the same image as a featured post.
Try deleting one of the duplicated images from your featured images.
Your theme will pull am image from each post, (usually the first image) and display it on your archives and home page.
March 7, 2013 at 8:30 pm #24918scoeMemberHi Brad Dalton,
So any way... my question is similar... maybe you can help.
I love the featured image but I only want it to show up if I actually go in and select an image as the featured image. Otherwise I want nothing there.
Currently if I am editing a post and I insert an icon from the media library (even one unattached to any post), Decor will automatically use the first image as the Decor image for the hook (genesis_before_post_title). This might be completely inappropriate.
Worse yet, after that you can't get rid of it. You can delete all the images from the post and it will still be there. It's listed as having been "uploaded to" that post in the media library even though you just inserted it. The only thing you can do is permanently delete the image. That means you can't use any small icons in posts unless you want them to be a featured image.
Can you help edit this code so that automatic attachment of an image as "featured image" never happens.
Thanks,
SCOE
This is the only function in the child theme that seems pertinent... but maybe this is a parent-theme function?
/** Add post image above post title */
add_action( 'genesis_before_post_title', 'decor_post_image' );
function decor_post_image() {
if ( is_page() ) return;
if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) {
printf( '<a href="%s" rel="bookmark" class="post-photo"><span class="post-date">%s</span><img src="%s" alt="%s" /></a>', get_permalink(), do_shortcode( '<em>[post_date format="j"]</em>[post_date format="F Y"]' ), $image, the_title_attribute( 'echo=0' ) );
}
}March 7, 2013 at 8:33 pm #24920scoeMemberThis reply has been marked as private.March 7, 2013 at 10:53 pm #24935mikemuellerParticipantSCOE - You nailed it! It was just the featured images that were set in archives. I had it turned off originally but I think the owner turned it back on.
Thanks!
MM
March 7, 2013 at 10:55 pm #24936scoeMemberThis reply has been marked as private.April 9, 2013 at 9:54 am #34278brankicaMemberParts of this thread (the solution apparently) are marked as private??? How can I see the solution to this problem?
April 9, 2013 at 10:28 am #34286scoeMemberHi Brankica, here's the private message. Let me know if you need any help. My client's decor site is:
hearthandhome.net
Also, I ended up using a default featured image plugin to use a tiny gold image set to the same width as the featured image specs. It gave me a tiny gold line on the top of all posts where I did not otherwise specify a featured image.
That solved the featured image problem, but caused a problem with the drop-down date as it would drop down over the text since the image was so small so I turned off the date. I am working my way through a course on CSS at the moment, so you are free to have anything from my site, but it may be more hassle than it's worth, because... kluges.
Anyway the private message is below. Be sure to download the latest decor files because the demo now does not have these errors (?) so they may have updated the code for decor. Not sure.
-- SCOE
-----------------------------------------------------------
Hi Mike Muller,
You may have selected in Genesis-Theme Settings -> Content Archives – Include the Featured Image. If you check that you’ll get a double image. You can also make this mistake in featured posts widgets. The featured image is included by default on archive pages in the Decor theme. If you have a featured image you can’t NOT show it in Archives for posts (not pages).
This is private because I am not sure it’s a solution.
Newcomer…
SCOE
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.