Skip Navigation

[Resolved] How can I display onlyt the latest post from a user in a view

This support ticket is created 2 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 – 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 6 replies, has 3 voices.

Last updated by Dido 2 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2286821

Hi, on hidden link
I made a slider what displays 1 custom field "foto" and the postlink.
I made a view in a view but now I see only one image, repeating.

When I don't use the view in a view, I see a nice slider with differtent pictures, but not only the latest post from a user.
there are 28 users and I want to show only the latest post.

Can you help me to choose the right filters?

#2286889

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

What is the objective?

You want the slider at the top of the page to iterate across all 28 users and, for each user, show their latest post, is that right?

I assume you are working with the legacy editor.

You need an outer View which queries the users, which you set up as a slider.

In the output of that View you add a nested View to show the latest post of the "current" user, where the current user is set by a post author query filter with the setting "Post author is set by the parent User View". That View also needs a limit of 1, so that only the most recent post is returned.

That's the basic set up, if you have something similar that is not working perhaps you can give more specific details of how it is set up.

#2289967
nested-view.png
Outer-view.JPG

Hi, I am sorry, but I really don't understand what your saying.

#2295779

Hi Nigel,
Can you explain me how to do this?

#2296143

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

To troubleshoot and suggest the next steps, I'll need to see exactly how these views are set up in the admin area.

Can you please share temporary admin login details, in reply to this message?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2296587

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details.

I reviewed the two views and made the following changes and the slider is working now:

1. The view "Home meest recente artikelen":

This parent view was set to show the 'Artikelen' posts. But I changed it to show the 'Antiquairs' posts because, at the parent/first level, we need to get the list of authors.

2. The view "1 Foto in band per antiquair":

In this child view, we need 1 article post from each author coming from the parent view's loop.

The "Artikelen" post type was correctly set in the content selection settings. But, there was no query filter added to limit the posts by relationship.

I added a post-relationship query filter, to show only posts connected to the current post in the loop with respect to the 'Antiquairs Artikelen' relationship.
( screenshot: hidden link )

In this same view, I also removed the 'no items found' message ( screenshot: hidden link ) and enabled the checkbox for the setting 'Disable the wrapping DIV around the View', under the "Loop Editor" section. This is needed to ensure that the child view's output only includes the necessary code for the image link, without any extra HTML.

I hope this helps and please let me know if you need any further assistance around this.

#2296683

My issue is resolved now. Many thanks!

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