Homepage › Community Forums › Aspire Theme Support › Moved: Reply To: Double images (featured image)
Hi Wes I have the some issue on legacy theme… I installed the last version but I cannot hide the featured images on top of page and post… I tried to change the setting but nothing happens… I also changed the code you sent in my functions file and it doesn’t work.
Many thanks for your help
@Italy Photography Productions You want to remove the entire Featured Images from showing at all? Or do you have 2 duplicate Featured Images showing up and you just need 1?
Hi Wes,
I would like to show it in the post and maybe in pages (can I choose where?). I would like to remove it from categories and archives.
Or…
Can I have a full width featured images before content? Can I insert post title over this images? This should be awesome… (like or similar this: https://buffer.com/transparency)
In addition, please Wes, can I reduce the top margin of the content avoiding to broke something? I have 80px so I cannot insert anything under the main menu bar…
Many thanks for your help…
Please note: I changed the green button a:hover color in the home page because it was to black on white background and was not possible to view. Is this a problem? You can view this @ my home page: https://studio154.it
Which version are you using? In the latest version of this theme, we’re using this code –
// Add featured image above the entry content
add_action( 'genesis_before_entry', 'legacy_featured_photo' );
function legacy_featured_photo() {
if ( ! ( is_singular() && has_post_thumbnail() ) ) {
return;
}
$image = genesis_get_image( 'format=url&size=single-posts' );
$thumb_id = get_post_thumbnail_id( get_the_ID() );
$alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
if ( '' == $alt ) {
$alt = the_title_attribute( 'echo=0' );
}
printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', esc_url( $image ), $alt );
}
That code will produce the Featured Image to show on the Blog pages, as well as the Single Blog Post pages as well. You can edit the position you want the image to appear in this part of the code –
add_action( 'genesis_before_entry', 'legacy_featured_photo' );
I have installed the last version of your theme downloaded from you site (client area)… is there something else?
I’m exactly use the code you sent me in my functions file… comparing my code with your code the only difference that I can find is this piece of code at the end of your sent code “->”. Is this an error? Have I to insert even this?
Anyway nothing changes
I understood how to change the images position.
Please I asked you about to obtain the post title on images, can you help me also about this? 🙂
Many thanks
Can you post the link to your Blog, or some of the Posts where the Images are doubling? If possible, would you be able to create a Temporary User/Password so I can login and see if I can quickly fix it myself?
“Can I have a full width featured images before content? Can I insert post title over this images? This should be awesome… (like or similar this:”
This is possible, but it would take some time to create Custom Code in order for that to work. Since it doesn’t come with the theme by default, you would have to search to see if there is already a tutorial available, or possibly Hire a Dev to code it up. I’m sure I could do it, I’d just need some time to put it together.
“comparing my code with your code the only difference that I can find is this piece of code at the end of your sent code “->”. Is this an error?”
That was an error when I wrote it here in the post. Whenever we edit our comments here in the forum, sometimes bbPress adds <!--formatted-->
at the end of the post if there’s code….I thought I erased it all but must have left a little. Just fixed it.
If you want me to try and login and fix the double images for you just let me know.
@Italy Photography Productions I moved our post to it’s own separate thread so we can continue the conversation here at this link.
Did you get an Email notification about this thread? Also, are you able to see my Private Reply here?
Which pages are Double images? I’m still not seeing them.
Here’s the Blog page – http://studio154.hairstyles.it/blog-fotografia-studio154/
And here’s a page I clicked from the Blog – http://studio154.hairstyles.it/servizi-fotografici-privati-ritratti-fotografie-famiglia/
I don’t see double images anywhere.
Can you post a link to a page that has the issue?
Hi Wes,
I changed something in functions.php so it seems work well but… I also asked:
1. How can I have a centered and full width images?
2. Can I set fixed size for this images?
3. How can I disable this feature choosing some pages or articles to hide it?
4. How can I disable this feature in all pages and articles?
5. Can I insert article and pages title on this image?
I’m sending this questions because I cannot exactly understand what is the sense to have featured images on top without can choose how to customize and display it… Can you suggest me how to use it? I cannot view examples in your demo.
Many thanks and all the best
“1. How can I have a centered and full width images?”
I copy/pasted this from my earlier reply –
“This is possible, but it would take some time to create Custom Code in order for that to work. Since it doesn’t come with the theme by default, you would have to search to see if there is already a Tutorial available, or possibly Hire a Dev to code it up. I’m sure I could do it, I’d just need some time to create the code and put it together.”
To set a certain/fixed size, you can edit the size that is right above the code in the functions file. It should look something like this –
// Register a custom image size for featured image on single Posts
add_image_size( 'single-posts', 900, 540, true );<!--formatted-->
Then you can select that size in your Genesis Theme Settings page in the Content Archives section.
“How can I disable this feature in all pages and articles?”
If you want to remove the feature from all pages and blog posts then you would uncheck the option in your Genesis Theme Settings page.
“Can I insert article and pages title on this image?”
This option isn’t available by Default, your theme would have to be Customized and the code would need to be created in order to do something like this.