- This topic has 11 replies, 2 voices, and was last updated 3 years, 5 months ago by Tom.
March 28, 2018 at 7:38 am #533782Tomas
Hey, Im trying to add an image to a post but without making it visible. I need it to be hidden but to show up when the user wants to “pin” the post.
I’ve read some guides on how to do this but the code they show doesn’t seem to be working.
What they say is to instert the image code inside this one:
<div style=”display:none;”>PASTE IMG CODE HERE</div>
Is there any other solution to this?
TomasGeneratePress 2.0.2March 28, 2018 at 10:28 am #534114TomLead DeveloperLead DeveloperMarch 28, 2018 at 1:52 pm #534338Tomas
Thanks for the quick reply. Your solution does work but there’s a problem. It works fine on pc but it doesn’t on mobile because I have AMP enabled for mobile devices. It actually works on mobile if you switch to the Non-AMP version but since my visitors will be seeing the AMP version on default I would need it to work there.
I guess that for it to work on the AMP version the image has to actually be inside the post. But I need it to be hidden. Is there any way to do this?
TomasMarch 28, 2018 at 9:23 pm #534585TomLead DeveloperLead Developer
Hmm, I’m not 100% sure unfortunately. You might find some info by Googling “Pinterest image hidden AMP” or something along those lines. I don’t have a lot of experience with the Pinterest API.March 30, 2018 at 8:54 am #536284Tomas
I undestand, but I think that if you actually attatch the image to the post and then hide it, that should work. Is there any way to do that? Just how the code I first talked about, but with one that actually works.
Thnaks!March 30, 2018 at 9:32 pm #536758TomLead DeveloperLead DeveloperMarch 31, 2018 at 7:54 am #537131Tomas
Yeah but I’m already using the featured image. So there’s no other way to add an image to the content and then hide it?March 31, 2018 at 8:51 am #537201TomLead DeveloperLead DeveloperMarch 31, 2018 at 9:34 am #537236Tomas
Yeah I can add them manually to the content, what I need is a code with which I can hide them after adding them.March 31, 2018 at 8:12 pm #537525TomLead DeveloperLead DeveloperApril 1, 2018 at 10:55 am #537971Tomas
Perfect, thanksApril 1, 2018 at 9:01 pm #538233
- You must be logged in to reply to this topic.