• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

duplicated images on post

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › duplicated images on post

This topic is: not resolved

Tagged: generate pro post image issue

  • This topic has 15 replies, 6 voices, and was last updated 8 years, 3 months ago by Tom.
Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • August 11, 2014 at 7:50 am #118184
    MikeMahaffey
    Member

    HI

    Using the Generate Pro Theme - can anyone tell me what I am doing that is causing my post to duplicate the image I insert into the page.

    When I enable excerpt images in genesis the image duplicates on the page.

    Thanks
    MikeMahaffey

    August 11, 2014 at 8:03 am #118187
    Anita
    Keymaster

    Try Jonathan's code - http://surefirewebservices.com/wordpress/wp-snippet-duplicate-featured-image-on-post-and-homepage. I believe it's because you have added the image first followed by the text but cannot be for sure as you didn't provide a link to your site.


    Love coffee, chocolate and my Bella!

    August 11, 2014 at 8:23 am #118188
    MikeMahaffey
    Member

    Hi,

    Sorry about that? The problem is at http://bestcuresforanxiety.com

    I turned on the enable images in contact archives so you can see them. I have not been able to use that function at all

    MikeMahaffey

    August 11, 2014 at 10:12 am #118211
    Anita
    Keymaster

    So, just for re-verification - you did copy/paste the snippet into your functions.php file and it does not work?


    Love coffee, chocolate and my Bella!

    August 11, 2014 at 10:33 am #118214
    MikeMahaffey
    Member
    This reply has been marked as private.
    August 11, 2014 at 10:47 am #118215
    Anita
    Keymaster

    Unfortunately, only moderators can see private messages. I cannot see what you have written.


    Love coffee, chocolate and my Bella!

    August 11, 2014 at 11:17 am #118224
    MikeMahaffey
    Member

    Yes, I did put that into my functions.php file, and it did not alter anything.

    Then I removed it.

    I have had this theme for a couple of months, and I have always been trying to figure this out. I have deleted the theme, and reinstalled it, I have removed all of the code I had inserted into functions file for various other improvements, I have disabled all of my plugins, but still have not seen a change.

    I figure it’s something I am doing wrong, but don’t know what it is?

    Thanks for your response
    MikeMahaffey

    August 11, 2014 at 11:47 am #118235
    Anita
    Keymaster

    Let me send out a Tweet to see if I can get someone to help. Give me a few minutes.


    Love coffee, chocolate and my Bella!

    August 11, 2014 at 12:09 pm #118240
    Genesis Developer
    Member

    Can you upload the code of functions.php file at pastebin.com and share the link? So I can check the code.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    August 11, 2014 at 12:25 pm #118243
    Ren Ventura
    Member

    Have you added any custom templates or modified existing ones?


    Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren

    August 11, 2014 at 12:55 pm #118250
    Tom
    Participant

    I second Paul's request to see functions.php posted at pastebin.com or similar. Jonathan’s snippet placed in functions.php should correct this. (as it does on my test setup of Generate Pro) Did you save the file and upload it back to your site after adding the code?


    Choose your next site design from over 350 Genesis themes.
    [ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]

    August 11, 2014 at 12:55 pm #118251
    MikeMahaffey
    Member

    Hi, and thanks

    this is the php code http://pastebin.com/jVt8TYEd

    The only thing i presently have in the theme is a read more code in the php

    I actually destroyed the themes files yesterday trying to find out what was wrong, deleted the theme from my server, and reinstalled it fresh..........I still have the same problem...

    Of course that makes me assume that it something I am simply doing wrong??

    Thanks
    MikeMahaffey

    August 11, 2014 at 12:56 pm #118252
    Tom
    Participant

    Unfortunately, only moderators can see private messages. Others cannot see what you have written.
    Thanks for fixing that!


    Choose your next site design from over 350 Genesis themes.
    [ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]

    August 11, 2014 at 1:12 pm #118257
    Genesis Developer
    Member

    Can you replace this current code

    
    //* Add featured image above the entry content
    add_action( 'genesis_entry_content', 'generate_featured_photo', 8 );
    function generate_featured_photo() {
            if ( is_page() || ! genesis_get_option( 'content_archive_thumbnail' ) )
                    return;
     
            if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
                    printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', $image, the_title_attribute( 'echo=0' ) );
            }
    }

    by this

    //* Add featured image above the entry content
    add_action( 'genesis_entry_content', 'generate_featured_photo', 8 );
    function generate_featured_photo() {
            if ( is_singular(array('post','page') )|| ! genesis_get_option( 'content_archive_thumbnail' ) )
                    return;
     
            if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
                    printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', $image, the_title_attribute( 'echo=0' ) );
            }
    }

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    October 23, 2014 at 11:29 am #128861
    techsite.us
    Member

    Its no wonder MikeM... has been going crazy. This is a very tenacious theme! I ran into this issue the other day and after using Bill Erickson's code, didn't work, and didn't have much time to follow up, I used css to hide it temporarily.

    Now i tried a post on my dev install and came here looking for the answer and none of the codes worked.
    I deleted the image from inside the the post but the top featured image remained.
    Tested on separate browser and sure enough, there it was.

    End result, 2 entries in wp_options under meta_key = _wp_attached_file that needed to be deleted.

    Latest WP and genesis

    Hopefully the devs here at genesis will come up with a fix shortly.

    October 23, 2014 at 1:35 pm #128881
    Tom
    Participant

    @techsite-us If you are wanting a response from StudioPress you'll have to contact them at http://my.StudioPress.com/help .


    Choose your next site design from over 350 Genesis themes.
    [ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]

  • Author
    Posts
Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble