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.
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.
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?
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.