Blog, Website & Page Publishing

NicoleT
Colaborador

Different image on hover for blog summary/listing page?

resolver

Trying to establish if this is possible.

 

My designer wants a different image to display on hover, for the blog listing page. I believe I'd need to add a image field to the post template, but is it possible to reference that image from the summary template?

 

 

0 Me gusta
1 Soluciones aceptada
webdew
Solución
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

Different image on hover for blog summary/listing page?

resolver

Hi @NicoleT ,

You can add the style at hover but you cannot add an image field to the post template because the image comes from a featured image tag and we can do it with hard code using JS and advanced CSS but it should be defined on a particular listing. 

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regard.

Ver la solución en mensaje original publicado

3 Respuestas 3
NicoleT
Colaborador

Different image on hover for blog summary/listing page?

resolver

Hi @webdew , thanks for your help!

 

So I could add it as a background image in the CSS file, but I'd need to manually hardcode it  for each post essentially? 

0 Me gusta
webdew
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

Different image on hover for blog summary/listing page?

resolver

Hi @NicoleT ,

Yes, you can use background CSS and nth CSS to specify the listing. 

 

For more you can refer this doc-https://www.w3schools.com/cssref/sel_nth-child.asp

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

webdew
Solución
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

Different image on hover for blog summary/listing page?

resolver

Hi @NicoleT ,

You can add the style at hover but you cannot add an image field to the post template because the image comes from a featured image tag and we can do it with hard code using JS and advanced CSS but it should be defined on a particular listing. 

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regard.