Skip Navigation

[Resolved] Need the way to do with any pic what possible with [wpv-post-featured-image]

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 6 months ago.

Assisted by: Minesh.

Author
Posts
#2465961

BV

Hello!

I need to request several images in Media Library in the same way it's possible with [wpv-post-featured-image] - I want to crop them to custom size ([wpv-post-featured-image size='custom' width='372' height='200' crop='true' crop_horizontal='center' crop_vertical='center']).

That images are not attached to any post and they aren't featured. Also, I want to do it out of any loop or post context. So it has to be requested by images' ids.

(if you are interested in what I'm trying to achieve: Before and after the loop of posts of the WordPress archive I have 3 blocks. They mimicking to posts, but ads in real. So the HTML layout is exactly the same, that posts in the archive loop, but I'll pull images directly from media lib).

#2466409

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As you can see the information from the shortcode:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-featured-image

The [wpv-post-featured-image] shortcode is used to "outputs the featured image for the current post." and the context will be "inside the view loop or content template".

Having said that the images has to be attached to post as a featured image and we do not have any other workaround to query the images based on the image IDs. This will require custom code and that is beyond the scope of our support policy. If you need custom programming for your project, I encourage you to contact any of our certified partners listed on the following link:
- https://toolset.com/contractors/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.