[Resolved] Hiding the Header Image

Home Forums Support [Resolved] Hiding the Header Image

Home Forums Support Hiding the Header Image

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #418818
    Jay

    Hi Guys,

    I have a question regarding hiding the Header/Featured Image on one of my sites. On https://jaygoodrich.com/stockphotos/ I am using a plugin called Sell Media. If you click on any photo in the catalog like this one: https://jaygoodrich.com/stockphotos/photos/group-riders-resting-hill-washington/ I have disabled the Featured Image / Page Header using GP Premium. Now if you go to search for a photo using the search functionality. Sell Media searches the individual Media Pages for the photos that have be uploaded into Sell Media. If you were searching, the image would come up like this: https://jaygoodrich.com/stockphotos/photos/group-riders-resting-hill-washington/group-riders-resting-hill-washington-2/#main If you notice the Featured Image is now showing up on the page.

    Is there a way to globally turn this off?

    I spoke with Graph Paper Press and this is what they said …

    “In version 2.4, Keywords are now associated with individual MEDIA, not ITEMS in Sell Media. This is because ITEMS can contain galleries of photos. Keywords must be a one-to-one ratio, not one-to-many, otherwise, they’re useless.

    Search results link to the individual media that’s rendered using the attachment.php template in your theme. If no attachment.php file exists it will use the archive.php template. Check your theme documentation to see if you can include the image as a header image to make your results and product pages match.”

    Sooooo … can you help me?

    Cheers,

    Jay G.

    #419078
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You could try doing something like this:

    add_action( 'wp', 'tu_no_attachment_featured_image' );
    function tu_no_attachment_featured_image() {
        if ( is_attachment() ) {
            remove_action( 'generate_after_header', 'generate_featured_page_header', 10 );
        }
    }

    Let me know if that works or not πŸ™‚

    #419100
    Jay

    Thank you Tom!

    Can I add that into the Snippets plugin?

    #419104
    Tom
    Lead Developer
    Lead Developer

    Yep πŸ™‚

    #419106
    Jay

    That did NOT work.

    #419143
    Tom
    Lead Developer
    Lead Developer

    Ah, sorry about that – I just adjusted the code above, can you try again?

    #419465
    Jay

    That didn’t work either. When I save the code into Snippets the screen goes white and does not reload. Do you think this may have something to do with it? Should I paste try pasting it directly into attachment.php or achieve.php? Just thinking that save issue may be creating some kind of issue?

    #420053
    Tom
    Lead Developer
    Lead Developer

    Looked into this more and saw that it shouldn’t be displaying on attachment pages anyways.

    Can you update to GPP 1.5.1 and see if it fixes it?

    Thanks!

    #420193
    Jay

    BOOM! Fixed. Thank you Tom!

    #420201
    Tom
    Lead Developer
    Lead Developer

    Perfect – thanks for the heads up! πŸ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.