- This topic has 9 replies, 2 voices, and was last updated 6 years, 10 months ago by Tom.
-
AuthorPosts
-
November 8, 2017 at 1:43 pm #418818Jay
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.
November 8, 2017 at 7:16 pm #419078TomLead DeveloperLead DeveloperHi 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 π
November 8, 2017 at 8:13 pm #419100JayThank you Tom!
Can I add that into the Snippets plugin?
November 8, 2017 at 8:15 pm #419104TomLead DeveloperLead DeveloperYep π
November 8, 2017 at 8:19 pm #419106JayThat did NOT work.
November 8, 2017 at 10:39 pm #419143TomLead DeveloperLead DeveloperAh, sorry about that – I just adjusted the code above, can you try again?
November 9, 2017 at 5:56 am #419465JayThat 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?
November 9, 2017 at 2:46 pm #420053TomLead DeveloperLead DeveloperLooked 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!
November 9, 2017 at 5:25 pm #420193JayBOOM! Fixed. Thank you Tom!
November 9, 2017 at 5:33 pm #420201TomLead DeveloperLead DeveloperPerfect – thanks for the heads up! π
-
AuthorPosts
- You must be logged in to reply to this topic.