Skip Navigation

[Résolu] how can I display images with a certain tag in a view?

This support ticket is created Il y a 6 années et 4 mois. 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.

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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Marqué : ,

This topic contains 1 réponse, has 2 voix.

Last updated by Beda Il y a 6 années et 3 mois.

Assisted by: Beda.

Auteur
Publications
#595081
media-file.jpg
code-in-view.jpg
all-posts-with-taxonomy-kou.jpg

on my website hidden link I made a filter to show pages, posts, custom posts and images in 1 view. I see al the posts, except the images. How can i make them show up?
When you test, search with the word "Kou"

Can you give me the right code for the view?

[wpv-conditional if="( '[wpv-post-type]' eq 'media' )"]
<div class="type ber">
<h3>[wpv-post-link]</h3>
<span class="ext">[types field='extra-informatie'][/types]</span>
[wpv-post-body output="raw"] <a href="[wpv-post-url]">Bekijk</a>
</div>
[/wpv-conditional]

#595251

Media should not be displayed directly in a View, usually.

Usually you create a view and Query the Post type where you write your post, not the Media Post type.

Then, in those posts you add Images, and wether they are Featured Image, Types Custom Fields or in the Post body added with the Media Uploader, you can then display them in the Loop of that View with:
- Featured Image ShortCode
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-featured-image
- Types Image Field ShortCode
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
- Post Body ShortCode if the image was added within the Body.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body

This way you get the images related to your Posts.
Otherwise, you get all Images from the Library in a irrigated order.

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