Answer the question
In order to leave comments, you need to log in
Add css style to first image inside wordpress post?
There are many images in the post, all of them are displayed in full size. Unfortunately, all the images inside the post have the same css, and I only need to change the size and style (using css) of the first image in the post.
Can you please tell me if it is possible to add a certain css style (for example, first-image) for the first image inside the post through function.php or in some other way.
Answer the question
In order to leave comments, you need to log in
Nikita Ignatiev , thanks for the first-child hint :)
The solution turned out to be the following:.entry-single p:first-child img {}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question