In Progress

chose thumbnail depending on image ASPECT RATIO in wordpress

Good afternoon.

In my home page I have a loop that displays a POST THUMBNAIL, previously added in the [url removed, login to view] file of the theme.

Now, I'm using the same thumbnail for both horizontal and vertical images.

But, I have created 2 thumbnails. The first one for horizontal images, and the second for vertical images.

So, I want to introduce a condition in this loop.

Instead of always echoing the same thumbnail...

I want that, depending on the ASPECT RATIO of the image of the post ( which means the division of it's width divided by it's height, which means, values that will be bigger, smaller or same as 1 ) it takes one thumbnail or the other thumbnail.

Thank you very much

Skills: PHP

See more: thumbnail, image divided, chose, aspect, depending, vertical php, wordpress vertical, php thumbnail, wordpress height, wordpress page thumbnail, wordpress post image, values wordpress, php file image, php thumbnail image, php aspect thumbnail, php thumbnail aspect, loop image, image post, php thumbnail aspect ratio, post image, horizontal wordpress, thumbnail post, post thumbnail wordpress, thumbnail image, image created

About the Employer:
( 7 reviews ) gelida, Germany

Project ID: #1153030

Awarded to:

ichurakov

Please check inbox. Thnx.

$30 USD in 0 days
(215 Reviews)
6.3