Skip Navigation

[Resolved] auto show first image?

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by a.R 5 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#1338457

a.R

hi there,
is it possible to automatically display the first image from a post text in search results previews of a custom search?
so one had a preview image without having to define a post image...
THANK YOU, regards, Achim

#1338633

Hi Achim,

Thank you for contacting us and I'd be happy to assist.

I'm afraid, there is no builtin feature available in Toolset, which can get the first image from the post's content, automatically.

You can create a custom shortcode ( ref: https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/ ) which gets the post's content and then extract the first available image.

Here are some relevant guides with example code snippets:

hidden link
hidden link
hidden link
https://stackoverflow.com/questions/18544915/get-first-image-from-wordpress-post

I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1344445

a.R

ok, that sounds complicated.
THANK YOU.