Skip Navigation

[Resolved] I like to filter a view by an other view and show images

This support ticket is created 7 years, 2 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Ronny Wunderlich 7 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#566411

I have a view with all my images of the site. But i like to show only images that are used in posts. Because i dont like to show my logo and pictures for impressum or other images around the site. Is there a way to filter by "when image is in use with a post" then show. And is there a way to filter by category from post where the image is used?

This was an answer in a previous ticket:

"Yes, something like this can be accomplished with two Views. The first View will find all the posts you want to include, using a category filter. In the Loop Output editor of this View, you will place your Media View using a shortcode, inside the wpv-loop tags. Then you must edit your Media View to use a post parent filter, where the parent is set by the current item in a Loop."

Now i make a view with the output of images. And an other view with the filter for posts. It works a little. But i have now a view with Loop 1 "post -> images" Loop 2 -> images and so on. But i like to show only images and the images should show in asc newest or name sorted. Not sorted by posts.

#566552

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ronny,

For this It would be best if I see the view myself so that I can get a feel of what you are trying to achieve.

Would you mind providing me with admin access to the website so that I can have a look ?

The private fields will be enabled.

Thanks,
Shane

#569630

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ronny,

Thanks for the credentials and I see the issue.

The problem is that you want to list a bunch of images based on a category correct? RIght now I see that you are listing all the images from the media gallery which is not recommended.

What I would recommend that you do is to create a separate CPT for your media images and create an image custom field for that media.

Then you will set the Media CPT as a child of your posts, this way the proper images will be displayed and it won't include any image from the media gallery that is not desired.

Thanks,
Shane

#569692

Ok, this is a way. But i like to upload an image in an article post. And this should show in the gallery without make more work.

It works, but my problem is, i will show only Images, that are in posts and not the other images. I see the previeous buttons and the logo. This shouldnt show. Is there a way?

#569760

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ronny,

There is a way and what I mention in the previous post is the day.

There isn't a way to filter the items that are directtly from the default wordpress media galler so you will need to create a separate cpt as mentioned in the post above.

Thanks,
Shane

#571659

Ok, thx. I have now a filter with author and switch all images for Logo and other to an other author. Now it works for me.