Dynamic content cannot be added on pseudo elements inside a loop

Dynamic content when you try to add to a pseudoelement inside a loop, it is not possible. It works if it is not dynamic content or if it is not a loop where you add the pseudo element

What do you mean? Are you trying to target a specified loop items for slight different styling?

I am trying to add on the ::after pseudoelement dynamically the featured image(as background) of each post on a loop for a query. As I mentioned I can do that if the image is not dynamically taken, or if the element is not inside of a loop, but not dynamically and inside a query loop. It is very easy to reproduce and test this bug.

This is very common when you are making content cards and use ::after or ::before to add some icon or text for example, that not interfere with the html

1 Like